mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-04-26 23:49:59 -07:00
Merge branch 'workflows' into documentation
This commit is contained in:
27
dist/scripts/rayhunter_daemon
vendored
Normal file
27
dist/scripts/rayhunter_daemon
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
#! /bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting rayhunter: "
|
||||
start-stop-daemon -S -b --make-pidfile --pidfile /tmp/rayhunter.pid \
|
||||
--startas /bin/bash -- -c "RUST_LOG=info exec /data/rayhunter/rayhunter-daemon /data/rayhunter/config.toml > /data/rayhunter/rayhunter.log 2>&1"
|
||||
echo "done"
|
||||
;;
|
||||
stop)
|
||||
echo -n "Stopping rayhunter: "
|
||||
start-stop-daemon -K -p /tmp/rayhunter.pid
|
||||
echo "done"
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "Usage rayhunter_daemon { start | stop | restart }" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user