Skip to content

Commit

Permalink
FreeBSD: Create rc.d service file (#255)
Browse files Browse the repository at this point in the history
See issue #253

Tested with Eternal Terminal v6.0.4 on FreeBSD 12.1-RELEASE-p1.
  • Loading branch information
ctsrc authored and Jason Gauci committed Nov 27, 2019
1 parent ea85406 commit ad5725d
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions rc.d/etserver
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"

0 comments on commit ad5725d

Please sign in to comment.