File: netplan.init

package info (click to toggle)
plan 1.8.3-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 2,012 kB
  • ctags: 2,141
  • sloc: ansic: 24,337; perl: 1,361; makefile: 988; sh: 757; yacc: 119; sed: 17
file content (40 lines) | stat: -rw-r--r-- 927 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#! /bin/sh
# Set ENABLED=0 to disable, ENABLED=1 to enable.
ENABLED=0

DAEMON=/usr/sbin/netplan
PATH=/bin:/usr/bin:/sbin:/usr/sbin

test -f $DAEMON || exit 0

if [ "$ENABLED" = 0 ]
then
#    echo "/etc/init.d/plan: netplan daemon not enabled"
    exit 0
fi

case "$1" in
  start)
    echo -n "Starting plan appointment daemon: netplan"
    start-stop-daemon --start --quiet --exec $DAEMON
    echo "."
    ;;
  stop)
    echo -n "Stopping plan appointment daemon: netplan"
    start-stop-daemon --stop --quiet --exec $DAEMON
    echo "."
    ;;
  restart | force-reload)
    echo -n "Stopping plan appointment daemon: netplan"
    start-stop-daemon --stop --quiet --exec $DAEMON
    echo "."
    echo -n "Restarting plan appointment daemon: netplan"
    start-stop-daemon --start --quiet --exec $DAEMON
    echo "."
    ;;
  *)
    echo "Usage: /etc/init.d/plan {start|stop|restart|force-reload}"
    exit 1
    ;;
esac
exit 0