fix position of uuid modification

This commit is contained in:
paukstelis
2022-05-23 16:21:32 -04:00
parent ee855303b6
commit 3a0d8fb284

View File

@@ -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