milis/talimatname/genel/y/yacy/yacy.rc

38 lines
558 B
Plaintext
Raw Normal View History

2018-06-09 00:06:58 +02:00
#!/bin/sh
#
# /etc/rc.d/yacy: start/stop yacy daemon
#
# User settings here
DAEMON=yacy
RUN_AS_USER=yacy
# end of user settings
RETVAL=0
case $1 in
start)
echo -n "Starting $DAEMON..."
su $RUN_AS_USER -c /usr/sbin/$DAEMON-start &> /dev/null & RETVAL=$?
echo " done."
;;
stop)
echo -n "Shutting down $DAEMON..."
su $RUN_AS_USER -c /usr/sbin/$DAEMON-stop &> /dev/null & RETVAL=$?
echo " done."
;;
restart)
$0 stop
sleep 20
$0 start
RETVAL=$?
;;
*)
echo "usage: $0 [start|stop|restart]"
;;
esac
exit $RETVAL
# End of file