summaryrefslogtreecommitdiff
path: root/openwrt/package/ez-ipupdate/files/ez-ipupdate.init
blob: 15721756153136d89f4e64c050327ea6e7c2974c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

BIN=ez-ipupdate
CONF=/etc/$BIN.conf
RUN_D=/var/run
PID_F=$RUN_D/$BIN.pid
[ -f $CONF ] || exit

case $1 in
 start)
  mkdir -p $RUN_D
  $BIN -c $CONF
  ;;
 stop)
  [ -f $PID_F ] && kill $(cat $PID_F)
  ;;
 *)
  echo "usage: $0 (start|stop)"
  exit 1
esac

exit $?