git://git.nikiroo.be
/
nikiroo-utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of github.com:nikiroo/fanfix
[nikiroo-utils.git]
/
fanfix.sysv
diff --git
a/fanfix.sysv
b/fanfix.sysv
index 2956d8967ea25016a52724846a397afeeabb3504..3d3b23bb00573c2ffb12d00c61915dcfd645fcad 100755
(executable)
--- a/
fanfix.sysv
+++ b/
fanfix.sysv
@@
-2,10
+2,10
@@
#
# 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
# Short-Description: Fanfix service
# Description: Starts the Fanfix remote service
### END INIT INFO
@@
-37,6
+37,8
@@
start)
echo "Fanfix is already running." >&2
false
else
echo "Fanfix is already running." >&2
false
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" &
echo $! > "$FPID"
fi
sudo -u "$USER" -- java -jar "$JAR" --server "$PINCODE" "$PORT" > "$OUT" 2> "$ERR" &
echo $! > "$FPID"
fi
@@
-66,7
+68,7
@@
stop)
kill -9 "`cat "$FPID"`" 2>/dev/null
fi
kill -9 "`cat "$FPID"`" 2>/dev/null
fi
- rm "$FPID"
+ rm
-f
"$FPID"
;;
restart)
sh "$0" stop
;;
restart)
sh "$0" stop