Commit 4f697cb0 authored by anarcat's avatar anarcat

run the daemon niced

this is to reduce load when heavy backup or migrate tasks are run by
the queue daemon. the NICE value is customizable in /etc/default/hosting-queued
parent 79ac21ca
......@@ -24,6 +24,7 @@ DAEMON_ARGS="@hostmaster $NAME" # Arguments to run the daemon with
USER="aegir"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
NICE=10
# Exit if the package is not installed
[ -x $DAEMON ] || exit 0
......@@ -51,7 +52,7 @@ do_start()
--make-pidfile --pidfile $PIDFILE --startas $DAEMON \
--test > /dev/null \
|| return 1
start-stop-daemon --start --quiet -c $USER --background \
start-stop-daemon --nice $NICE --start --quiet -c $USER --background \
--make-pidfile --pidfile $PIDFILE --startas $DAEMON -- \
$DAEMON_ARGS \
|| return 2
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment