From 3a0d8fb284ea1e9cf468eca614521530afc0b629 Mon Sep 17 00:00:00 2001 From: paukstelis Date: Mon, 23 May 2022 16:21:32 -0400 Subject: [PATCH] fix position of uuid modification --- octoprint_deploy.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/octoprint_deploy.sh b/octoprint_deploy.sh index 3e06201..7cf28ca 100755 --- a/octoprint_deploy.sh +++ b/octoprint_deploy.sh @@ -245,8 +245,10 @@ new_instance () { cp -rp $BFOLD $OCTOCONFIG/.$INSTANCE #Do config.yaml modifications here if needed.. - cat $BFOLD/config.yaml | sed -e "s/INSTANCE/$INSTANCE/" > $OCTOCONFIG/.$INSTANCE/config.yaml - + cat $BFOLD/config.yaml | sed -e "s/INSTANCE/$INSTANCE/" > $OCTOCONFIG/.$INSTANCE/config.yaml + #uniquify instances + sed -i "s/upnpUuid: .*/upnpUuid: $(uuidgen)/" $OCTOCONFIG/.$INSTANCE/config.yaml + if [[ -n $CAM || -n $USBCAM ]]; then write_camera fi @@ -324,11 +326,6 @@ write_camera() { echo " stream: http://$(hostname).local:$CAMPORT?action=stream" >> $OCTOCONFIG/.$INSTANCE/config.yaml echo - #uniquify instances - #modify upnpUuid - UUID=$(uuidgen) - sed -i "s/upnpUuid: $PARTITION_COLUMN.*/upnpUuid: $UUID/" $OCTOCONFIG/.$INSTANCE/config.yaml - #Either Serial number or USB port #Serial Number if [ -n "$CAM" ]; then