X-Git-Url: http://git.ozo.com/?a=blobdiff_plain;f=hnetd%2Ffiles%2Fohp-script;fp=hnetd%2Ffiles%2Fohp-script;h=aebaa1db871a6daffc29f642314756a34b6a9b3b;hb=4988cbc735131ea90af79019190cd1f9b5ee2db2;hp=0000000000000000000000000000000000000000;hpb=6beba22a4d96eb0d40132298885e0b7da6741210;p=lede-routing%2F.git diff --git a/hnetd/files/ohp-script b/hnetd/files/ohp-script new file mode 100644 index 0000000..aebaa1d --- /dev/null +++ b/hnetd/files/ohp-script @@ -0,0 +1,48 @@ +#!/bin/sh +#-*-sh-*- +# +# $Id: ohp-script $ +# +# Author: Markus Stenberg +# +# Copyright (c) 2014 cisco Systems, Inc. +# +# Created: Fri Jan 17 11:46:30 2014 mstenber +# Last modified: Mon Feb 3 14:39:15 2014 mstenber +# Edit time: 15 min +# + +# This is minimalist init.d-like start/stop script for +# ohybridproxy. However, as ohybridproxy receives it's configuration +# via command line, the 'start' command is also equivalent to +# 'restart', and has bunch of extra arguments.. + +OHP=ohybridproxy + +start() { + $OHP $* & +} + +stop() { + killall -9 $OHP +} + + +CMD=$1 +# For debugging purposes +LOGNAME=`basename $0` +echo "$*" | logger -t "$LOGNAME" +case $CMD in + start) + shift + stop + start $* + ;; + stop) + stop + ;; + *) + echo "Only start [config]/stop supported" + exit 1 + ;; +esac