blob: 5d4691915b932c412e887dc596ff924985fbb57e (
plain) (
blame)
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
35
36
37
38
39
40
41
42
|
#!/bin/sh
# PROVIDE: inv_sig_helper
# REQUIRE: NETWORKING
# KEYWORD: shutdown
. /etc/rc.subr
name=inv_sig_helper
rcvar=inv_sig_helper_enable
load_rc_config "$name"
: ${inv_sig_helper_enable:='NO'}
: ${inv_sig_helper_dir:='/usr/local/invidious/inv_sig_helper.git'}
: ${inv_sig_helper_user='www'}
: ${inv_sig_helper_syslog_priority:='info'}
: ${inv_sig_helper_syslog_facility:='daemon'}
: ${inv_sig_helper_socket:='/var/run/invidious/inv_sig_helper.sock'}
inv_sig_helper_syslog_tag=inv_sig_helper
inv_sig_helper_chdir=$inv_sig_helper_dir
pidfile=/var/run/invidious/inv_sig_helper.pid
command=/usr/sbin/daemon
command_args="-f \
-s ${inv_sig_helper_syslog_priority} \
-l ${inv_sig_helper_syslog_facility} \
-T ${inv_sig_helper_syslog_tag} \
-p ${pidfile} \
-t inv_sig_helper \
${inv_sig_helper_dir}/target/release/inv_sig_helper_rust ${inv_sig_helper_socket}"
procname="${inv_sig_helper_dir}/target/release/inv_sig_helper_rust"
start_precmd=inv_sig_helper_prestart
inv_sig_helper_prestart(){
install -d -m 0755 -o ${inv_sig_helper_user} /var/run/invidious
}
run_rc_command "$1"
|