hnetd: Disabling localservice from default dnsmasq configuration. In a hnetd topology...
[feed/routing.git] / hnetd / files / ohp-script
1 #!/bin/sh
2 #-*-sh-*-
3 #
4 # $Id: ohp-script $
5 #
6 # Author: Markus Stenberg <mstenber@cisco.com>
7 #
8 # Copyright (c) 2014 cisco Systems, Inc.
9 #
10 # Created: Fri Jan 17 11:46:30 2014 mstenber
11 # Last modified: Mon Feb 3 14:39:15 2014 mstenber
12 # Edit time: 15 min
13 #
14
15 # This is minimalist init.d-like start/stop script for
16 # ohybridproxy. However, as ohybridproxy receives it's configuration
17 # via command line, the 'start' command is also equivalent to
18 # 'restart', and has bunch of extra arguments..
19
20 OHP=ohybridproxy
21
22 start() {
23 $OHP $* &
24 }
25
26 stop() {
27 killall -9 $OHP
28 }
29
30
31 CMD=$1
32 # For debugging purposes
33 LOGNAME=`basename $0`
34 echo "$*" | logger -t "$LOGNAME"
35 case $CMD in
36 start)
37 shift
38 stop
39 start $*
40 ;;
41 stop)
42 stop
43 ;;
44 *)
45 echo "Only start [config]/stop supported"
46 exit 1
47 ;;
48 esac