Skip to content

Instantly share code, notes, and snippets.

@pooza
Created November 2, 2018 07:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pooza/b61843f6597c921459413aaa6cce5488 to your computer and use it in GitHub Desktop.
Save pooza/b61843f6597c921459413aaa6cce5488 to your computer and use it in GitHub Desktop.
#!/bin/sh
# PROVIDE: god
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable the puppet agent:
#
# god_enable="YES"
. /etc/rc.subr
name="god"
rcvar=god_enable
load_rc_config "$name"
: ${god_enable="NO"}
start_cmd=${name}_start
stop_cmd=${name}_stop
god_start() {
/usr/local/bin/god -c /usr/local/etc/local.god --log-level info
}
god_stop() {
/usr/local/bin/god terminate
}
run_rc_command "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment