mirror of
https://github.com/rembo10/headphones.git
synced 2026-07-21 00:14:02 +01:00
Updated init scripts a little
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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/>
|
||||||
|
|||||||
@@ -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"/>
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user