Make LNPLAY server updates.
This commit is contained in:
parent
01c86c6ed0
commit
afcc6b5fec
@ -80,10 +80,11 @@ if ! incus list --format csv | grep -q "$INCUS_VM_NAME"; then
|
|||||||
|
|
||||||
bash -c "./stub_profile.sh --vm=$VIRTUAL_MACHINE --incus-hostname=$INCUS_VM_NAME --ss-volume-name=$SSDATA_VOLUME_NAME --backup-volume-name=$BACKUP_VOLUME_NAME"
|
bash -c "./stub_profile.sh --vm=$VIRTUAL_MACHINE --incus-hostname=$INCUS_VM_NAME --ss-volume-name=$SSDATA_VOLUME_NAME --backup-volume-name=$BACKUP_VOLUME_NAME"
|
||||||
|
|
||||||
if ! incus image list -q --format csv | grep -q "$INCUS_VM_NAME"; then
|
INCUS_LNPLAYSERVER_IMAGE_NAME="lnplayserver-$DOMAIN_NAME"
|
||||||
|
if ! incus image list -q --format csv | grep -q "$INCUS_LNPLAYSERVER_IMAGE_NAME"; then
|
||||||
script -q -c "incus init -q $DOCKER_BASE_IMAGE_NAME $INCUS_VM_NAME --vm --profile=$INCUS_VM_NAME" /dev/null
|
script -q -c "incus init -q $DOCKER_BASE_IMAGE_NAME $INCUS_VM_NAME --vm --profile=$INCUS_VM_NAME" /dev/null
|
||||||
elif [ "$VIRTUAL_MACHINE" = lnplayserver ]; then
|
elif [ "$VIRTUAL_MACHINE" = lnplayserver ]; then
|
||||||
script -q -c "incus init -q $INCUS_VM_NAME $INCUS_VM_NAME --vm --profile=$INCUS_VM_NAME" /dev/null
|
script -q -c "incus init -q $INCUS_LNPLAYSERVER_IMAGE_NAME $INCUS_VM_NAME --vm --profile=$INCUS_VM_NAME" /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# let's PIN the HW address for now so we don't exhaust IP
|
# let's PIN the HW address for now so we don't exhaust IP
|
||||||
|
@ -451,17 +451,19 @@ EOL
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
INCUS_VM_NAME="${LNPLAY_SERVER_FQDN//./-}"
|
INCUS_LNPLAYSERVER_IMAGE_NAME="lnplayserver-$DOMAIN_NAME"
|
||||||
if ! incus image list -q --format csv | grep -q "$INCUS_VM_NAME"; then
|
if ! incus image list -q --format csv | grep -q "$INCUS_LNPLAYSERVER_IMAGE_NAME"; then
|
||||||
|
|
||||||
# do all the docker image creation steps, but don't run services.
|
# do all the docker image creation steps, but don't run services.
|
||||||
bash -c "./project/lnplay/up.sh -y --no-services --lnplay-conf-path=$LNPLAY_ENV_FILE"
|
bash -c "./project/lnplay/up.sh -y --no-services --lnplay-conf-path=$LNPLAY_ENV_FILE"
|
||||||
|
|
||||||
# stop the instance so we can get an image yo
|
# stop the instance so we can get an image yo
|
||||||
|
INCUS_VM_NAME="${LNPLAY_SERVER_FQDN//./-}"
|
||||||
|
|
||||||
incus stop "$INCUS_VM_NAME"
|
incus stop "$INCUS_VM_NAME"
|
||||||
|
|
||||||
# create the incus image.
|
# create the incus image.
|
||||||
incus publish -q --public "$INCUS_VM_NAME" --alias="$INCUS_VM_NAME" --compression none
|
incus publish -q --public "$INCUS_VM_NAME" --alias="$INCUS_LNPLAYSERVER_IMAGE_NAME" --compression none
|
||||||
|
|
||||||
incus start "$INCUS_VM_NAME"
|
incus start "$INCUS_VM_NAME"
|
||||||
sleep 10
|
sleep 10
|
||||||
@ -470,8 +472,6 @@ EOL
|
|||||||
sleep 3
|
sleep 3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# bring up lnplay services.
|
# bring up lnplay services.
|
||||||
bash -c "./project/lnplay/up.sh -y --lnplay-conf-path=$LNPLAY_ENV_FILE"
|
bash -c "./project/lnplay/up.sh -y --lnplay-conf-path=$LNPLAY_ENV_FILE"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user