Case: A sudo
-installed application needs to be run as local user upon startup AND/OR a shell script is required to be called upon startup.
Call the desired script from /etc/rc.local
and it will run as root on startup.
To run as local user: sudo -u username /full/path/to/application
When creating a shell (.sh) script to call, start with: #!/bin/sh -e
or whatever environment you would like to include, ex: #!/usr/bin/env python
Sources
- https://unix.stackexchange.com/questions/201768/storing-shell-scripts
- https://stackoverflow.com/questions/8339555/how-to-run-a-script-at-the-start-up-of-ubuntu
Did this solve your issue?
THIS WORKED FOR ME. HELP OTHERS BY VOTING HOW IT WORKED FOR YOU.
RIGHT NOW THIS HAS HELPED 0% WEBSITE VISITORS.
TOTAL VOTES: 0
RIGHT NOW THIS HAS HELPED 0% WEBSITE VISITORS.
TOTAL VOTES: 0