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
88728c9f
Commit
88728c9f
authored
11 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Replace the4 old and apparently broken rc.d script with the one I've been
running on my FreeBSD box for years.
parent
cc9b35da
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/rc.d/sbbs
+33
-41
33 additions, 41 deletions
install/rc.d/sbbs
with
33 additions
and
41 deletions
install/rc.d/sbbs
+
33
−
41
View file @
88728c9f
#!/bin/sh
# PROVIDE: sbbs
# REQUIRE: login
# PROVIDE sbbs
# REQUIRE LOGIN
.
/etc/rc.subr
# Location of rc.subr
if
[
`
/usr/bin/uname
-r
| /usr/bin/sed
's/[^0-9].*//g'
`
-lt
5
]
then
rc_subr_path
=
"/usr/local/etc/rc.subr"
else
rc_subr_path
=
"/etc/rc.subr"
fi
if
[
!
-f
${
rc_subr_path
}
]
then
echo
"
${
rc_subr_path
}
not found"
>>
/dev/stderr
if
[
`
/usr/bin/uname
-r
| /usr/bin/sed
's/[^0-9].*//g'
`
-lt
5
]
echo
"Please install the sysutils/rc_subr port"
>>
/dev/stderr
exit
1
fi
.
${
rc_subr_path
}
status_cmd
=
sbbs_status
name
=
"sbbs"
name
=
sbbs
rcvar
=
`
set_rcvar
`
load_rc_config
$name
load_rc_config
$
{
name
}
# Setup defaults...
# Define these sbbs_* variables in one of these files:
...
...
@@ -36,28 +17,43 @@ load_rc_config $name
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
sbbs
=
${
sbbs
-
"NO"
}
sbbs_enable
=
${
sbbs_enable
-
"NO"
}
sbbs_flags
=
${
sbbs_flags
-
""
}
sbbs_pidfile
=
${
sbbs_pidfile
-
"/var/run/sbbs.pid"
}
sbbs_dir
=
${
sbbs_dir
-
"/sbbs
/
"
}
sbbs_ctrldir
=
${
sbbs_ctrldir
-
"
${
sbbs_dir
}
/ctrl
/
"
}
sbbs_execdir
=
${
sbbs_execdir
-
"
${
sbbs_dir
}
/exec
/
"
}
sbbs_dir
=
${
sbbs_dir
-
"/sbbs"
}
sbbs_ctrldir
=
${
sbbs_ctrldir
-
"
${
sbbs_dir
}
/ctrl"
}
sbbs_execdir
=
${
sbbs_execdir
-
"
${
sbbs_dir
}
/exec"
}
sbbs_program
=
${
sbbs_program
-
"
${
sbbs_execdir
}
/sbbs"
}
sbbs_procname
=
${
sbbs_procname
-
"
${
sbbs_
program
}
"
}
sbbs_procname
=
${
sbbs_procname
-
"
${
sbbs_
execdir
}
/sbbs
"
}
sbbs_shell
=
${
sbbs_shell
-
"/bin/sh"
}
sbbs_status
()
status_cmd
=
sbbs_node
start_precmd
=
sbbs_env
command
=
${
sbbs_program
}
pidfile
=
${
sbbs_pidfile
}
sbbs_node
()
{
${
sbbs_execdir
}
/node list
echo
if
[
-n
"
$rc_pid
"
]
;
then
echo
"
${
name
}
is running as pid
$rc_pid
."
else
echo
"
${
name
}
is not running."
return
1
fi
if
[
-n
"
$rc_pid
"
]
;
then
echo
"
${
name
}
is running as pid
$rc_pid
."
else
echo
"
${
name
}
is not running."
return
1
fi
}
sbbs_env
()
{
SHELL
=
$sbbs_shell
export
SHELL
SBBSCTRL
=
$sbbs_ctrldir
export
SBBSCTRL
PATH
=
/bin:/usr/bin:/usr/games:/usr/local/bin
export
PATH
}
extra_commands
=
"config monitor uedit"
...
...
@@ -65,8 +61,4 @@ config_cmd=${sbbs_execdir}/scfg
monitor_cmd
=
${
sbbs_execdir
}
/umonitor
uedit_cmd
=
${
sbbs_execdir
}
/uedit
SHELL
=
$sbbs_shell
export
SHELL
SBBSCTRL
=
$sbbs_ctrldir
export
SBBSCTRL
run_rc_command
"
$1
"
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