Re: Running a script at bootup
Originally Posted by
halogen2
Those are some very old instructions. In current Ubuntu versions the way to run a custom script during boot is to create a systemd service.
what if i want my script to run BEFORE systemd is run? i have a script that checks for certain hardware conditions that the hardware can randomly change, and if the conditions are not as desired, will reboot (this is when the conditions can change) the whole system as fast as possible, with a minimum of processes up and running. i plan to add a sanity check to this script to count the reboots if a writable filesystem is mounted, and halt or freeze if that count is higher than a number coded into the script. or i could let it come up like normal and run another script to email me if it had difficulty (and shutdown once the email is networked off the system ... how yet to be explored ... probably sendmail logs).
Last edited by Skaperen; 4 Weeks Ago at 03:04 AM.
Mask wearer, Social distancer, System Administrator, Programmer, Linux advocate, Command Line user, Ham radio operator (KA9WGN/8, tech), Photographer (hobby), occasional tweetXer
Bookmarks