As described in this thread , the recommended way to set up some commands/scripts to run at startup was to add a @reboot entry in the crontab file.
Sometimes I won't be using my Proxmox home server for days, and I don't want it to keep up and running.
For that, I have my machine configured to wake up (in bios) every day at a specific time, and I added a shell script to be run at boot time that checks a remote server (HTTP request) whether it should keep up or shut down.
If it is to shut down, a "shutdown -P 1" is called from this script.
However, that just won't work. The machine will keep up and running forever.
If I ssh into this machine and call the shutdown, it will shutdown.
I added some logs in this script to make sure it's being called, and what user is calling it, and it is being called by root.
I have no idea what's going on.
Any clues?
PS: The server is at my parent's place, that's why I won't just power it on or off manually.
Sometimes I won't be using my Proxmox home server for days, and I don't want it to keep up and running.
For that, I have my machine configured to wake up (in bios) every day at a specific time, and I added a shell script to be run at boot time that checks a remote server (HTTP request) whether it should keep up or shut down.
If it is to shut down, a "shutdown -P 1" is called from this script.
However, that just won't work. The machine will keep up and running forever.
If I ssh into this machine and call the shutdown, it will shutdown.
I added some logs in this script to make sure it's being called, and what user is calling it, and it is being called by root.
I have no idea what's going on.
Any clues?
PS: The server is at my parent's place, that's why I won't just power it on or off manually.