File nzbget.sh of Package nzbget
#!/bin/bash # extract runas username from conf eval $(/usr/bin/grep DaemonUsername= /etc/nzbget.conf) # LockFile will be overriden, create runtime dir mkdir -p /run/nzbget || exit -1 test -n $DaemonUsername || exit 0 # chown the config to allow the daemon change it when running unprivileged chown $DaemonUsername /etc/nzbget.conf || exit -1 # chown the runtime dir chown $DaemonUsername /run/nzbget || exit -1 exit 0