init-script-template
init-script-template copied to clipboard
A template for simple System V init scripts
This was not working for forks as it was only killing the ancestor. Updated the template to kill the whole tree The command for killing a process group is from...
I had some trouble running a command with quotes. eval fixed it.
Added options variable. Should be useful for many services. Doesn't break anything.
In the interest of writing valid INIT scripts, I have added `force-reload` action. According to documentation `force-reload` is required action in LSB-compilant scripts. Source: * [Debian docs](https://wiki.debian.org/LSBInitScripts) `force-reload` behavior is...
As explained in #20 the process stored in `/var/run/pid_file` is the PID for the command `sudo -U ` which causes an error when the user attempts to stop the process...
I am having a problem stopping a script that I am running using the `user` option. I configured the permissions on some necessary directories to be able to start the...
Adding `-i` to sudo command. This uses a login shell for the $user.
Bash, even in posix emulation mode, will expand braced sequences (I don't think that's the official name for this construction). ``` $ bash --posix -c 'echo {1..10}' 1 2 3...
Name
Shouldn't it be better to assign the value of the name variable manually instead of receiving the name of the script???. Because in Ubuntu the first time the script is...
I'm running as a non-root user that doesn't have access to /var/run. What I have to do so that the user has access to the pid file is to create...