Updated init scripts a little

This commit is contained in:
Bas Stottelaar
2014-06-02 10:24:18 +02:00
parent 19c4e7d7d3
commit 5064beffe9
4 changed files with 25 additions and 24 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ status_cmd="${name}_status"
stop_cmd="${name}_stop" stop_cmd="${name}_stop"
command="/usr/sbin/daemon" command="/usr/sbin/daemon"
command_args="-f -p ${headphones_pid} python ${headphones_dir}/Headphones.py ${headphones_flags} --quiet" command_args="-f -p ${headphones_pid} python ${headphones_dir}/Headphones.py ${headphones_flags} --quiet --nolaunch"
# Ensure user is root when running this script. # Ensure user is root when running this script.
if [ `id -u` != "0" ]; then if [ `id -u` != "0" ]; then
+3 -2
View File
@@ -8,8 +8,9 @@
<array> <array>
<string>/usr/bin/python</string> <string>/usr/bin/python</string>
<string>/Applications/Headphones/headphones.py</string> <string>/Applications/Headphones/headphones.py</string>
<string>-q</string> <string>--quiet</string>
<string>-d</string> <string>--daemon</string>
<string>--nolaunch</string>
</array> </array>
<key>RunAtLoad</key> <key>RunAtLoad</key>
<true/> <true/>
+1 -1
View File
@@ -22,7 +22,7 @@
<method_credential user="sabnzbd" group="sabnzbd"/> <method_credential user="sabnzbd" group="sabnzbd"/>
</method_context> </method_context>
<exec_method type="method" name="start" exec="python /opt/headphones/Headphones.py -d" timeout_seconds="60"/> <exec_method type="method" name="start" exec="python /opt/headphones/Headphones.py --daemon --quiet --nolaunch" timeout_seconds="60"/>
<exec_method type="method" name="stop" exec=":kill" timeout_seconds="60"/> <exec_method type="method" name="stop" exec=":kill" timeout_seconds="60"/>
+2 -2
View File
@@ -4,10 +4,10 @@
## Edit user configuation in /etc/default/headphones to change ## Edit user configuation in /etc/default/headphones to change
## ##
## Make sure init script is executable ## Make sure init script is executable
## sudo chmod +x /opt/headphones/init.ubuntu ## sudo chmod +x /path/to/init.ubuntu
## ##
## Install the init script ## Install the init script
## sudo ln -s /opt/headphones/init.ubuntu /etc/init.d/headphones ## sudo ln -s /path/to/init.ubuntu /etc/init.d/headphones
## ##
## Create the headphones daemon user: ## Create the headphones daemon user:
## sudo adduser --system --no-create-home headphones ## sudo adduser --system --no-create-home headphones