source: bootscripts/lfs/init.d/template@ 8e9d4bf

arm
Last change on this file since 8e9d4bf was 1a64229, checked in by William Harrington <kb0iic@…>, 2 years ago

Adapt template to new semantics of S/K symlinks

  • Property mode set to 100644
File size: 1.4 KB
RevLine 
[1c48007]1#!/bin/sh
2########################################################################
[0cda898]3# Begin scriptname
[1c48007]4#
5# Description :
6#
7# Authors :
8#
[0cda898]9# Version : LFS x.x
[1c48007]10#
11# Notes :
12#
13########################################################################
14
[0cda898]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
[f874424]28. /lib/lsb/init-functions
[1c48007]29
30case "${1}" in
[0cda898]31 start)
[f874424]32 log_info_msg "Starting..."
[1a64229]33 # if it is possible to use start_daemon
[f874424]34 start_daemon fully_qualified_path
[1a64229]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
[0cda898]41 ;;
42
43 stop)
[f874424]44 log_info_msg "Stopping..."
[1a64229]45 # if it is possible to use killproc
[f874424]46 killproc fully_qualified_path
[1a64229]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
[0cda898]53 ;;
54
55 restart)
56 ${0} stop
57 sleep 1
58 ${0} start
59 ;;
60
61 *)
[f874424]62 echo "Usage: ${0} {start|stop|restart}"
[0cda898]63 exit 1
64 ;;
[1c48007]65esac
66
[f874424]67exit 0
68
[0cda898]69# End scriptname
Note: See TracBrowser for help on using the repository browser.