| 1 | #!/bin/sh |
| 2 | # PROVIDE: meshagent |
| 3 | # REQUIRE: FILESYSTEMS NETWORKING |
| 4 | # KEYWORD: shutdown |
| 5 | . /etc/rc.subr |
| 6 | |
| 7 | name="meshagent" |
| 8 | desc="MeshCentral Agent" |
| 9 | rcvar=${name}_enable |
| 10 | pidfile="/var/run/meshagent.pid" |
| 11 | meshagent_chdir="/usr/local/mesh" |
| 12 | command="/usr/sbin/daemon" |
| 13 | command_args="-P ${pidfile} -r -f /usr/local/mesh/meshagent " |
| 14 | |
| 15 | load_rc_config $name |
| 16 | : ${meshagent_enable="YES"} |
| 17 | run_rc_command "$1" |