#!/bin/execlineb -P
envfile /etc/s6/config/deluge.conf
importas -sCuD "n3 s2000000 T" DELUGE_WEB_DIRECTIVES DELUGE_WEB_DIRECTIVES
ifelse { test -w /var/log } {
	foreground { install -d -o s6log -g s6log /var/log/deluge-web }
	s6-setuidgid s6log exec -c s6-log -d3 -b -- ${DELUGE_WEB_DIRECTIVES} /var/log/deluge-web
}
foreground { install -d -o s6log -g s6log /run/log/deluge-web }
s6-setuidgid s6log exec -c s6-log -d3 -b -- ${DIRECTIVES_WEB_DIRECTIVES} /run/log/deluge-web
