@@ -422,6 +422,55 @@ add_swap() {
422
422
read_sleep 3
423
423
}
424
424
425
+ install_inv_sig_helper () {
426
+ if [[ -d $USER_DIR ]]
427
+ then
428
+ echo -e " Downloading Invidious sig helper service from GitHub"
429
+
430
+ cd $USER_DIR || exit 1
431
+
432
+ git clone https://github.com/iv-org/inv_sig_helper.git
433
+ chown -R $USER_NAME :$USER_NAME inv_sig_helper
434
+ cd inv_sig_helper || exit 1
435
+ # Install cargo / rust
436
+ curl -fsSL sh.rustup.rs | sh -s -- -y
437
+ # Source cargo
438
+ . " $HOME /.cargo/env"
439
+ # Build release
440
+ cargo build --release
441
+ # Copy service file to systemd folder
442
+ cp -rp $USER_DIR /inv_sig_helper/inv_sig_helper.service /etc/systemd/system/
443
+ # Add socket to config
444
+ ${SUDO} echo " signature_server: /home/invidious/tmp/inv_sig_helper.sock" >> $USER_DIR /invidious/config/config.yml
445
+ if [[ ! -d /home/invidious/tmp ]]
446
+ then
447
+ ${SUDO} mkdir -p /home/invidious/tmp
448
+ chown -R $USER_NAME :$USER_NAME /home/invidious/tmp
449
+ fi
450
+ SERVICE_NAME=inv_sig_helper.service
451
+ # Enable invidious sig helper at boot
452
+ ${SUDO} $SYSTEM_CMD enable ${SERVICE_NAME}
453
+ # Reload Systemd
454
+ ${SUDO} $SYSTEM_CMD daemon-reload
455
+ # Start Invidious sig helper
456
+ ${SUDO} $SYSTEM_CMD start ${SERVICE_NAME}
457
+ if ( $SYSTEM_CMD -q is-active ${SERVICE_NAME} )
458
+ then
459
+ echo -e " Invidious sig helper service has been successfully installed!"
460
+ ${SUDO} $SYSTEM_CMD status ${SERVICE_NAME} --no-pager
461
+ echo -e " Restarting Invidious for changes to take effect..."
462
+ ${SUDO} $SYSTEM_CMD restart invidious
463
+ read_sleep 5
464
+ else
465
+ echo -e " Invidious sig helper service installation failed..."
466
+ ${SUDO} journalctl -u ${SERVICE_NAME}
467
+ read_sleep 5
468
+ fi
469
+ else
470
+ echo -e " Invidious is not installed..."
471
+ fi
472
+ }
473
+
425
474
# # get total free memory size in megabytes(MB)
426
475
free=$( free -mt | grep Total | awk ' {print $4}' )
427
476
if [[ " $free " -le 2048 ]]; then
@@ -1190,6 +1239,7 @@ host replication all ::1/128 md5" | ${SUDO} t
1190
1239
# Not figured out why yet, so let's set permissions after as well...
1191
1240
run_ok " set_permissions" " Setting folder permissions again to be sure"
1192
1241
run_ok " logrotate_install" " Adding logrotate configuration"
1242
+ run_ok " install_inv_sig_helper" " Installing Inv sig helper"
1193
1243
log_success " Invidious Setup Finished"
1194
1244
1195
1245
# Make sure the cursor is back (if spinners misbehaved)
0 commit comments