File: init.d

package info (click to toggle)
latd 1.32
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 1,352 kB
  • sloc: cpp: 8,489; sh: 878; makefile: 85
file content (55 lines) | stat: -rw-r--r-- 1,000 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/sh
#
# Starts/Stops latd process
#
### BEGIN INIT INFO
# Provides:          latd
# Required-Start:    $network
# Required-Stop:     $network
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start the LAT daemon
# Description:       Starts the Local Area Transport daemon to receive
#                    incoming requests and mediate outgoing ones.
### END INIT INFO
#
# -----------------------------------------------------------------------------
#

#
# Look for latcp
#
LATCP="/usr/sbin/latcp"

test -f "$LATCP" || exit 0

case $1 in
   start)
     echo -n "Starting LAT: latd"
     $LATCP -s
     STATUS=$?
     echo "."
     ;;

   stop)
     echo -n "Stopping LAT: latd"
     $LATCP -h
     STATUS=$?
     echo "."
     ;;

   restart|force-reload)
     echo -n "Restarting LAT: latd"
     $LATCP -h
     $LATCP -s
     STATUS=$?
     echo "done."
     ;;

   *)
     echo "Usage $0 {start|stop|restart|force-reload}"
     STATUS=0;
     ;;
esac

exit $STATUS