Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
f6de9233
Commit
f6de9233
authored
20 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Simplified the save exit status logic.
parent
ba73e20d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
install/init.d/sbbs
+11
-13
11 additions, 13 deletions
install/init.d/sbbs
with
11 additions
and
13 deletions
install/init.d/sbbs
+
11
−
13
View file @
f6de9233
#!/bin/bash
#
# Linux service startup script (init file) for Synchronet
# Linux system service run script (init file) for Synchronet
#
# This file normally goes in your /etc/init.d directory
#
# $Id$
...
...
@@ -35,8 +37,7 @@ export SBBSCTRL=$SBBSDIR/ctrl
# RedHat/SysVinit commands
start_daemon
=
"daemon"
daemon_status
=
"status"
rc_status
=
"redhat_status"
rc_status_v
=
"redhat_status"
rc_status
=
"save_status"
rc_exit
=
"exit"
# load the function library (to define the daemon and killproc functions)
...
...
@@ -54,8 +55,7 @@ elif [ -f /etc/rc.status ] ; then
# Convert init commands to SUSE (rc.status) syntax
start_daemon
=
"startproc"
daemon_status
=
"checkproc"
rc_status
=
"rc_status"
rc_status_v
=
"rc_status -v"
rc_status
=
"rc_status -v"
rc_exit
=
"rc_exit"
else
echo
$"Unsupported init type"
...
...
@@ -68,16 +68,16 @@ proc="$SBBSDIR/exec/$prog"
pidfile
=
"/var/run/sbbs.pid"
lockfile
=
"/var/lock/subsys/sbbs"
redhat
_status
()
{
save
_status
()
{
retval
=
$?
}
start
()
{
echo
-n
$"Starting
$pro
c
: "
echo
-n
$"Starting
$pro
g
: "
shift
$start_daemon
$proc
-d
$@
# Remember status and be verbose
$rc_status
_v
$rc_status
echo
[
$retval
=
0
]
&&
touch
$lockfile
return
$retval
...
...
@@ -87,7 +87,7 @@ stop() {
echo
-n
$"Stopping
$prog
: "
killproc
$proc
# Remember status and be verbose
$rc_status
_v
$rc_status
echo
[
$retval
=
0
]
&&
rm
-f
$lockfile
$pidfile
return
$retval
...
...
@@ -97,7 +97,7 @@ reload(){
echo
-n
$"Reloading
$prog
: "
killproc
$proc
-HUP
# Remember status and be verbose
$rc_status
_v
$rc_status
echo
return
$retval
}
...
...
@@ -111,18 +111,16 @@ case "$1" in
;;
status
)
$daemon_status
$proc
$rc_status
_v
$rc_status
;;
restart
)
stop
start
$@
$rc_status
;;
condrestart
)
if
[
-f
$pidfile
]
;
then
stop
start
$@
$rc_status
fi
;;
reload
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment