From 3a4f8e8d0c32f379cc3d710caca2b2b5a6937f7b Mon Sep 17 00:00:00 2001 From: Daniel van Dorp Date: Fri, 5 Aug 2016 16:33:46 +0200 Subject: [PATCH] dist/init/linux-sysvinit: execute setcap directly `$(which setcap)` might evaluate to nothing, and this way the error thrown will be more clear. If setcap is not available on Debian/Ubuntu, you can install the package `libcap2-bin` --- dist/init/linux-sysvinit/caddy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/init/linux-sysvinit/caddy b/dist/init/linux-sysvinit/caddy index 52d89acf..70ddd322 100644 --- a/dist/init/linux-sysvinit/caddy +++ b/dist/init/linux-sysvinit/caddy @@ -22,7 +22,7 @@ LOGFILE=/var/log/$NAME.log CONFIGFILE=/etc/caddy/Caddyfile DAEMONOPTS="-agree=true -pidfile=$PIDFILE -log=$LOGFILE -conf=$CONFIGFILE" -USERBIND="$(which setcap) cap_net_bind_service=+ep" +USERBIND="setcap cap_net_bind_service=+ep" STOP_SCHEDULE="${STOP_SCHEDULE:-QUIT/5/TERM/5/KILL/5}" test -x $DAEMON || exit 0