blob: 31f2ef60dee0ae4455629cf49591557344840925 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#!/bin/sh
# $FreeBSD$
#
# PROVIDE: sshout
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# To enable this service, add
# sshout_enable="<bool>" # Set to NO by default.
# # Set it to YES to enable sshout.
# into /etc/rc.conf.local or /etc/rc.conf
. /etc/rc.subr
name=sshout
rcvar=sshout_enable
load_rc_config $name
: ${sshout_enable:="NO"}
sshout_user=sshout
sshout_home="`getent passwd sshout | cut -d : -f 6`"
[ -z "$sshout_home" ] && exit 1
sshout_env="HOME=$sshout_home"
sshout_chdir="$sshout_home"
procname=%%PREFIX%%/libexec/sshoutd
pidfile="$sshout_home/sshoutd.pid"
command=/usr/sbin/daemon
command_args="-f $procname"
stop_postcmd="rm -f $pidfile"
run_rc_command "$1"
|