bash script at Proxmox start-up

friendodevil

Member
Apr 5, 2022
39
3
8
I've put a bash script at /etc/init.d, changed in to executable but Proxmox doesn't execute it when it boots.
How can I add a command script to execute when Proxmox boots?
 
nano /etc/crontab
Then add a line like this if you want root to run a bash script after boot:
@reboot root /bin/bash /path/to/your/script.sh > /dev/null 2>&1
 
  • Like
Reactions: LnxBil
Thank you! What does "> /dev/null 2>&1" indicate?
It will pipe the output of that script into the void, so crontab won't send you emails each time your script echos/prints something or complains because of a warning/error.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!