little service manager thing i made
- Shell 100%
| README.md | ||
| servicectl | ||
servicectl
little service manager thing i made
How to set it up
- Make a folder to hold all your services. ~/services works well for this.
- Change every instance of
/home/user/services/to/path/to/your/service/folder/in the script. - Add a user for each of your services, and set each user's home folder to
/path/to/your/services/folder/<service name>/. - Privilege each user with the required privileges for each service. For example, a service to automatically update the system probably needs elevated privileges to use the package manager.
- su to each service and make a
~/start.shand~/stop.shfile. In thestart.shfile, put a shell script to start the service, and in thestop.shfile, put a shell script to stop the service. Make sure both scripts are executable.
How to use it
Start a service:
# ./servicectl start <service name>
Stop a service:
# ./servicectl stop <service name>
Run servicectl with no arguments to get a list of commands.