diff options
Diffstat (limited to 'pcr/yacy-openrc/yacy')
-rwxr-xr-x | pcr/yacy-openrc/yacy | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/pcr/yacy-openrc/yacy b/pcr/yacy-openrc/yacy new file mode 100755 index 000000000..1f5d125fd --- /dev/null +++ b/pcr/yacy-openrc/yacy @@ -0,0 +1,30 @@ +#!/usr/bin/openrc-run + +PIDFile=/opt/yacy/.yacy/yacy.pid +User=yacy + +description="YaCy P2P Web Search" + +depend() { + need net +} + +start() { + ebegin "Starting Yacy" + start-stop-daemon --background --user "${User}" --start --pidfile "${PIDFILE}" --quiet --exec /opt/yacy/yacy start + eend $? +} + +stop() { + ebegin "Stopping Yacy" + start-stop-daemon --stop --pidfile "${PIDFILE}" --quiet --exec /opt/yacy/yacy stop + eend $? +} + +reload() { + ebegin "Reloading Yacy." + start-stop-daemon --stop --pidfile "${PIDFILE}" --quiet --exec /opt/yacy/yacy stop + start-stop-daemon --background --user "${User}" --start --pidfile "${PIDFILE}" --quiet --exec /opt/yacy/yacy start + #/opt/yacy/yacy restart + eend $? +} |