Last active
June 14, 2019 13:46
-
-
Save koichirok/c06d060a7c6413bd7ed258fd48a68941 to your computer and use it in GitHub Desktop.
FreeBSD rc script for wetty (https://github.com/krishnasrinivas/wetty)
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
#!/bin/sh | |
# | |
# $FreeBSD: $ | |
# | |
# PROVIDE: wetty | |
# REQUIRE: DAEMON | |
# KEYWORD: shutdown | |
# | |
# Add the following to /etc/rc.conf[.local] to enable this service | |
# | |
# wetty_enable="YES" | |
# | |
. /etc/rc.subr | |
name="wetty" | |
rcvar="wetty_enable" | |
load_rc_config ${name} | |
: ${wetty_enable=NO} | |
pidfile=/var/run/wetty.pid | |
command="/usr/local/bin/wetty" | |
command_interpreter="/usr/local/bin/node" | |
start_cmd="${name}_start" | |
wetty_start() | |
{ | |
echo -n "Starting ${name}." | |
/usr/sbin/daemon -p ${pidfile} ${command_interpreter} ${command} | |
} | |
run_rc_command "$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment