arm
Last change
on this file since b00d379 was 1a64229, checked in by William Harrington <kb0iic@…>, 3 years ago |
Adapt template to new semantics of S/K symlinks
|
-
Property mode
set to
100644
|
File size:
1.4 KB
|
Line | |
---|
1 | #!/bin/sh
|
---|
2 | ########################################################################
|
---|
3 | # Begin scriptname
|
---|
4 | #
|
---|
5 | # Description :
|
---|
6 | #
|
---|
7 | # Authors :
|
---|
8 | #
|
---|
9 | # Version : LFS x.x
|
---|
10 | #
|
---|
11 | # Notes :
|
---|
12 | #
|
---|
13 | ########################################################################
|
---|
14 |
|
---|
15 | ### BEGIN INIT INFO
|
---|
16 | # Provides: template
|
---|
17 | # Required-Start:
|
---|
18 | # Should-Start:
|
---|
19 | # Required-Stop:
|
---|
20 | # Should-Stop:
|
---|
21 | # Default-Start:
|
---|
22 | # Default-Stop:
|
---|
23 | # Short-Description:
|
---|
24 | # Description:
|
---|
25 | # X-LFS-Provided-By:
|
---|
26 | ### END INIT INFO
|
---|
27 |
|
---|
28 | . /lib/lsb/init-functions
|
---|
29 |
|
---|
30 | case "${1}" in
|
---|
31 | start)
|
---|
32 | log_info_msg "Starting..."
|
---|
33 | # if it is possible to use start_daemon
|
---|
34 | start_daemon fully_qualified_path
|
---|
35 | # if it is not possible to use start_daemon
|
---|
36 | # (command to start the daemon is not simple enough)
|
---|
37 | if ! pidofproc daemon_name_as_reported_by_ps >/dev/null; then
|
---|
38 | command_to_start_the_service
|
---|
39 | fi
|
---|
40 | evaluate_retval
|
---|
41 | ;;
|
---|
42 |
|
---|
43 | stop)
|
---|
44 | log_info_msg "Stopping..."
|
---|
45 | # if it is possible to use killproc
|
---|
46 | killproc fully_qualified_path
|
---|
47 | # if it is not possible to use killproc
|
---|
48 | # (the daemon shoudn't be stopped by killing it)
|
---|
49 | if pidofproc daemon_name_as_reported_by_ps >/dev/null; then
|
---|
50 | command_to_stop_the_service
|
---|
51 | fi
|
---|
52 | evaluate_retval
|
---|
53 | ;;
|
---|
54 |
|
---|
55 | restart)
|
---|
56 | ${0} stop
|
---|
57 | sleep 1
|
---|
58 | ${0} start
|
---|
59 | ;;
|
---|
60 |
|
---|
61 | *)
|
---|
62 | echo "Usage: ${0} {start|stop|restart}"
|
---|
63 | exit 1
|
---|
64 | ;;
|
---|
65 | esac
|
---|
66 |
|
---|
67 | exit 0
|
---|
68 |
|
---|
69 | # End scriptname
|
---|
Note:
See
TracBrowser
for help on using the repository browser.