File: netplan.init

package info (click to toggle)
plan 1.8.7-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,196 kB
  • ctags: 1,971
  • sloc: ansic: 24,392; perl: 1,361; sh: 1,030; makefile: 514; yacc: 120; sed: 17
file content (45 lines) | stat: -rw-r--r-- 1,024 bytes parent folder | download
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
41
42
43
44
45
#! /bin/sh
# Set ENABLED=0 to disable, ENABLED=1 to enable.
ENABLED=0

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

# Load local overrides
if [ -f /etc/default/netplan ] ; then
    . /etc/default/netplan
fi

test -f $DAEMON || exit 0

if [ "$ENABLED" = 0 ]
then
    echo "Netplan daemon not enabled in /etc/init.d/netplan."
    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