diff options
author | Stefan Husmann | 2015-06-09 00:27:21 +0200 |
---|---|---|
committer | Stefan Husmann | 2015-06-09 00:27:21 +0200 |
commit | b81690f69f9fef75bf88ed6b6d83f2c35910fc9c (patch) | |
tree | cbc8800d98480827e78318310f58cf8554ab5fbf /hop | |
download | aur-b81690f69f9fef75bf88ed6b6d83f2c35910fc9c.tar.gz |
initial version
Diffstat (limited to 'hop')
-rwxr-xr-x | hop | 43 |
1 files changed, 43 insertions, 0 deletions
@@ -0,0 +1,43 @@ +#!/bin/bash + +HOP_OPTS=-v2 +HOP=/usr/bin/hop +HOP_PORT=8080 + +. /etc/rc.conf +. /etc/rc.d/functions + +if [ -f /etc/conf.d/hop ]; then + . /etc/conf.d/hop +fi + +case "$1" in + start) + stat_busy "Starting Hop service" + $HOP -p $HOP_PORT --accept-kill $HOP_OPTS &> /dev/null 2> /var/log/hop.log & + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon hop + stat_done + fi + ;; + stop) + stat_busy "Stopping Hop service" + $HOP -p $HOP_PORT --kill &> /dev/null & + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon hop + stat_done + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" + ;; +esac |