From 48f7e61605ce305e07babe8dec10d18bc1f61ed4 Mon Sep 17 00:00:00 2001 From: Tommy Miland Date: Fri, 11 Oct 2024 12:47:35 +0200 Subject: [PATCH] Add if condition to signature server - Added if condition to signature server --- invidious_update.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/invidious_update.sh b/invidious_update.sh index bc7bd54..33ddd5b 100755 --- a/invidious_update.sh +++ b/invidious_update.sh @@ -1491,7 +1491,11 @@ install_inv_sig_helper() { # Copy service file to systemd folder cp -rp $USER_DIR/inv_sig_helper/inv_sig_helper.service /etc/systemd/system/ # Add socket to config - ${SUDO} echo "signature_server: /home/invidious/tmp/inv_sig_helper.sock" >> $USER_DIR/invidious/config/config.yml + if ! grep -oq "signature_server:" $USER_DIR/invidious/config/config.yml + then + ${SUDO} echo "signature_server:" >> $USER_DIR/invidious/config/config.yml + fi + ${SUDO} sed -i "s/signature_server: .*/signature_server: \/home\/invidious\/tmp\/inv_sig_helper\.sock/" $USER_DIR/invidious/config/config.yml if [[ ! -d /home/invidious/tmp ]] then ${SUDO} mkdir -p /home/invidious/tmp