-
-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FreeBSD: Create rc.d service file (#255)
See issue #253 Tested with Eternal Terminal v6.0.4 on FreeBSD 12.1-RELEASE-p1.
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/sh | ||
|
||
# FreeBSD rc.d service file | ||
# | ||
# PROVIDE: etserver | ||
# REQUIRE: DAEMON | ||
# KEYWORD: shutdown | ||
# | ||
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf | ||
# to enable this service: | ||
# | ||
# etserver_enable (bool): Set to NO by default. | ||
# Set it to YES to enable etserver. | ||
|
||
. /etc/rc.subr | ||
|
||
name=etserver | ||
rcvar="${name}_enable" | ||
|
||
command="/usr/local/bin/etserver" | ||
pidfile=${etserver_pidfile:="/var/run/etserver.pid"} | ||
|
||
load_rc_config $name | ||
|
||
: ${etserver_enable:="NO"} | ||
|
||
command_args="--daemon --cfgfile /usr/local/etc/etserver/et.cfg --pidfile ${pidfile}" | ||
|
||
run_rc_command "$1" |