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