File: init.d

package info (click to toggle)
latd 1.35
  • links: PTS
  • area: main
  • in suites: bullseye, buster, stretch
  • size: 724 kB
  • ctags: 780
  • sloc: cpp: 8,485; sh: 145; makefile: 44
file content (59 lines) | stat: -rw-r--r-- 1,151 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/sh
#
# Starts/Stops latd process
#
### BEGIN INIT INFO
# Provides:          latd
# Required-Start:    $network $remote_fs
# Required-Stop:     $network $remote_fs
# 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
#
# -----------------------------------------------------------------------------
#
. /lib/lsb/init-functions
#
# 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."
     ;;

   status)
     status_of_proc -p "$PIDFILE" "/usr/sbin/latd" latd && exit 0 || exit $?
     ;;

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

exit $STATUS