Skip to content

Instantly share code, notes, and snippets.

@burningtree
Created March 14, 2012 01:33
Show Gist options
  • Select an option

  • Save burningtree/2033247 to your computer and use it in GitHub Desktop.

Select an option

Save burningtree/2033247 to your computer and use it in GitHub Desktop.
Sample ServerDensity.com FreeBSD rc.d script
#!/bin/sh
. /etc/rc.subr
name="sd_agent"
rcvar="sd_agent_enable"
sd_agent_cmd="/root/sd-agent/agent.py"
command=$sd_agent_cmd
command_args="$1"
stop_cmd="python ${sd_agent_cmd} stop"
command_interpreter="python"
pidfile="/tmp/sd-agent.pid"
load_rc_config $name
run_rc_command "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment