From: Niki Roo Date: Sun, 12 May 2019 10:58:27 +0000 (+0200) Subject: fix sysv script X-Git-Tag: fanfix-3.0.0~59 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=59be4dd3a262885e867de1fa89f516ac68e81e41;p=fanfix.git fix sysv script --- diff --git a/fanfix.sysv b/fanfix.sysv index 3d3b23b..5ab6912 100755 --- a/fanfix.sysv +++ b/fanfix.sysv @@ -12,10 +12,7 @@ ENABLED=true USER=fanfix - JAR=/path/to/fanfix.jar -PINCODE="my password" -PORT=12000 FPID=/tmp/fanfix.pid OUT=/var/log/fanfix @@ -39,7 +36,7 @@ start) else [ -e "$OUT" ] && mv "$OUT" "$OUT".previous [ -e "$ERR" ] && mv "$ERR" "$ERR".previous - sudo -u "$USER" -- java -jar "$JAR" --server "$PINCODE" "$PORT" > "$OUT" 2> "$ERR" & + sudo -u "$USER" -- java -jar "$JAR" --server > "$OUT" 2> "$ERR" & echo $! > "$FPID" fi @@ -48,7 +45,7 @@ start) ;; stop) if sh "$0" status --quiet; then - sudo -u "$USER" -- java -jar "$JAR" --stop-server "$PINCODE" "$PORT" + sudo -u "$USER" -- java -jar "$JAR" --stop-server fi i=1