blob: ee250aa6de23db1830132f6124a73fd458430e75 (
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
|
#!/bin/ksh
daemon="/usr/local/bin/dserver"
daemon_flags="-cfg /etc/dserver/dtail.json"
daemon_user="_dserver"
. /etc/rc.d/rc.subr
rc_reload=NO
rc_pre() {
# /var/run is wiped by /etc/rc at boot — recreate the runtime dirs and
# repopulate the SSH key cache on every service start (a daily cron job
# keeps it fresh afterwards). The SSH host key lives in persistent
# /var/db/dserver so it survives reboots (a regenerated host key would
# break clients' known_hosts).
install -d -o _dserver /var/log/dserver
install -d -o _dserver /var/run/dserver/cache
install -d -o _dserver -m 0700 /var/db/dserver
if [ -x /usr/local/bin/dserver-update-key-cache.sh ]; then
/usr/local/bin/dserver-update-key-cache.sh
fi
}
rc_cmd $1 &
|