Thanks to Scott Jones <morbidsvt@gmail.com>
# Change this to the user you want to run deluged as.
# You may specify a group too, after a colon
DELUGED_USER=""
+# DELUGED_UMASK="0002"
# DELUGED_OPTS="-p 58846"
DELUGEUI_START="false"
DELUGEUI_OPTS="-u web"
ebegin "Starting Deluged"
start-stop-daemon --start --user "${DELUGED_USER%:*}" \
--name deluged --pidfile /var/run/deluged.pid --background --make-pidfile \
+ ${DELUGED_UMASK:+--umask ${DELUGED_UMASK}} \
--exec /usr/bin/deluged -e HOME="${DELUGED_USER_HOME}" -- --do-not-daemonize "${DELUGED_OPTS}"
eend $?