git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Version 3.1.1
[fanfix.git]
/
fanfix.sysv
diff --git
a/fanfix.sysv
b/fanfix.sysv
index 10be756a8e77f5b189cba115d99c9aaabc624308..5ab6912a8707fcf8121728b3ff378d676273fc35 100755
(executable)
--- a/
fanfix.sysv
+++ b/
fanfix.sysv
@@
-2,20
+2,17
@@
#
# fanfix This starts the Fanfix remote service.
#
#
# fanfix This starts the Fanfix remote service.
#
-# chkconfig: 2345 10 90
# description: Starts the Fanfix remote service
#
### BEGIN INIT INFO
# description: Starts the Fanfix remote service
#
### BEGIN INIT INFO
+# Default-Start: 3 4 5
# Short-Description: Fanfix service
# Description: Starts the Fanfix remote service
### END INIT INFO
ENABLED=true
USER=fanfix
# Short-Description: Fanfix service
# Description: Starts the Fanfix remote service
### END INIT INFO
ENABLED=true
USER=fanfix
-
JAR=/path/to/fanfix.jar
JAR=/path/to/fanfix.jar
-PINCODE="my password"
-PORT=12000
FPID=/tmp/fanfix.pid
OUT=/var/log/fanfix
FPID=/tmp/fanfix.pid
OUT=/var/log/fanfix
@@
-37,7
+34,9
@@
start)
echo "Fanfix is already running." >&2
false
else
echo "Fanfix is already running." >&2
false
else
- sudo -u "$USER" -- java -jar "$JAR" --server "$PINCODE" "$PORT" > "$OUT" 2> "$ERR" &
+ [ -e "$OUT" ] && mv "$OUT" "$OUT".previous
+ [ -e "$ERR" ] && mv "$ERR" "$ERR".previous
+ sudo -u "$USER" -- java -jar "$JAR" --server > "$OUT" 2> "$ERR" &
echo $! > "$FPID"
fi
echo $! > "$FPID"
fi
@@
-46,7
+45,7
@@
start)
;;
stop)
if sh "$0" status --quiet; then
;;
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
fi
i=1