aboutsummaryrefslogtreecommitdiffstats
path: root/bootscripts
diff options
context:
space:
mode:
authorPierre Labastie <pierre.labastie@neuf.fr>2022-03-22 11:30:52 +0100
committerPierre Labastie <pierre.labastie@neuf.fr>2022-03-25 10:24:45 +0100
commit887af775a52a78e1e1552b5c0b83aaa5b98fa1a2 (patch)
tree1d147e98002f9f38e80d5d17567893bd23052f6f /bootscripts
parent27d23b1d4161c092a4a58391ad2ad92c8b5c4844 (diff)
Adapt template to new semantics of S/K symlinks
Diffstat (limited to 'bootscripts')
-rw-r--r--bootscripts/lfs/init.d/template14
1 files changed, 14 insertions, 0 deletions
diff --git a/bootscripts/lfs/init.d/template b/bootscripts/lfs/init.d/template
index 59c5f3cba..0a7872d98 100644
--- a/bootscripts/lfs/init.d/template
+++ b/bootscripts/lfs/init.d/template
@@ -30,12 +30,26 @@
case "${1}" in
start)
log_info_msg "Starting..."
+ # if it is possible to use start_daemon
start_daemon fully_qualified_path
+ # if it is not possible to use start_daemon
+ # (command to start the daemon is not simple enough)
+ if ! pidofproc daemon_name_as_reported_by_ps >/dev/null; then
+ command_to_start_the_service
+ fi
+ evaluate_retval
;;
stop)
log_info_msg "Stopping..."
+ # if it is possible to use killproc
killproc fully_qualified_path
+ # if it is not possible to use killproc
+ # (the daemon shoudn't be stopped by killing it)
+ if pidofproc daemon_name_as_reported_by_ps >/dev/null; then
+ command_to_stop_the_service
+ fi
+ evaluate_retval
;;
restart)