#!/bin/sh # # Author: Bernard Spil # # $FreeBSD: head/net/endlessh/files/endlessh.in 516582 2019-11-03 18:02:20Z brnrd $ # # PROVIDE: endlessh # REQUIRE: LOGIN # KEYWORD: shutdown # Add the following lines to /etc/rc.conf to enable endlessh: # endlessh_enable="YES" # endlessh_daemonuser="nobody" # endlessh_config="" Default %%PREFIX%%/etc/endlessh.conf # endlessh_logfile"" Default /var/log/endlessh.log # endlessh_args="" these override the conf file . /etc/rc.subr name=endlessh rcvar=endlessh_enable load_rc_config $name : ${endlessh_enable:=NO} : ${endlessh_daemonuser:=nobody} : ${endlessh_config:=%%PREFIX%%/etc/endlessh.conf} : ${endlessh_logfile:=/var/log/endlessh.log} pidfile=/var/run/endlessh.pid procname="%%PREFIX%%/bin/endlessh" command=/usr/sbin/daemon command_args='-p ${pidfile} -u ${endlessh_daemonuser} -o ${endlessh_logfile} ${procname} -f ${endlessh_config} ${endlessh_args}' run_rc_command $1