feat: auto mainsailOS / fluiddPi migration

script: make use of moonrakers new log_path configuration option

script: create webui nginx log symlinks upon installation/update
This commit is contained in:
th33xitus
2021-06-11 12:09:10 +02:00
parent f804fcb65d
commit d344b1c5f6
7 changed files with 140 additions and 11 deletions

View File

@@ -65,6 +65,7 @@ EOT
status_msg "Creating MJPG-Streamer service ..."
sudo cp $MJPG_SERV_SRC $MJPG_SERV_TARGET
sudo sed -i "s|%USER%|${USER}|" $MJPG_SERV_TARGET
ok_msg "MJPG-Streamer service created!"
### step 6: enabling and starting mjpg-streamer service
status_msg "Starting MJPG-Streamer service ..."
@@ -72,6 +73,12 @@ EOT
sudo systemctl start webcamd.service
ok_msg "MJPG-Streamer service started!"
### step 6.1: create webcamd.log symlink
[ ! -d ${HOME}/klipper_logs ] && mkdir -p "${HOME}/klipper_logs"
if [ -f "/var/log/webcamd.log" ] && [ ! -L "${HOME}/klipper_logs/webcamd.log" ]; then
ln -s "/var/log/webcamd.log" "${HOME}/klipper_logs/webcamd.log"
fi
### confirm message
CONFIRM_MSG="MJPG-Streamer has been set up!"
print_msg && clear_msg