diff options
author | Cullum Smith <cullum@sacredheartsc.com> | 2024-12-15 21:55:30 -0500 |
---|---|---|
committer | Cullum Smith <cullum@sacredheartsc.com> | 2024-12-15 21:55:30 -0500 |
commit | d4ab744834c3d278041abdc4669de96d462bc9c6 (patch) | |
tree | 9824fb23fd9d64d5d7b141d759554eabd296431b /files/usr/local/etc/rc.d | |
parent | 3229c913f4191bfaf2619c15139310f2597cd3e0 (diff) | |
download | infrastructure-d4ab744834c3d278041abdc4669de96d462bc9c6.tar.gz |
got invidious working
Diffstat (limited to 'files/usr/local/etc/rc.d')
-rw-r--r-- | files/usr/local/etc/rc.d/inv_sig_helper.invidious_server | 42 | ||||
-rw-r--r-- | files/usr/local/etc/rc.d/invidious.invidious_server | 2 |
2 files changed, 43 insertions, 1 deletions
diff --git a/files/usr/local/etc/rc.d/inv_sig_helper.invidious_server b/files/usr/local/etc/rc.d/inv_sig_helper.invidious_server new file mode 100644 index 0000000..5d46919 --- /dev/null +++ b/files/usr/local/etc/rc.d/inv_sig_helper.invidious_server @@ -0,0 +1,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" diff --git a/files/usr/local/etc/rc.d/invidious.invidious_server b/files/usr/local/etc/rc.d/invidious.invidious_server index 44acbad..720c437 100644 --- a/files/usr/local/etc/rc.d/invidious.invidious_server +++ b/files/usr/local/etc/rc.d/invidious.invidious_server @@ -1,7 +1,7 @@ #!/bin/sh # PROVIDE: invidious -# REQUIRE: NETWORKING +# REQUIRE: NETWORKING inv_sig_helper # KEYWORD: shutdown . /etc/rc.subr |