How can I get a specific script to run (preferably not as superuser) whenever the machine boots, but before login. It can be the last thing to run on boot. I mostly just want the script to work even if no user logs in.
I would recommend using cron
. The special time value of @reboot
will spawn your job at each reboot as your user. For example, run crontab -e
and use:
@reboot /home/yourself/bin/some_script_to_run
For more details on the special time formats, see man 5 crontab
No comments:
Post a Comment