Skip to content

Commit

Permalink
update wizard to reflect change from debian to ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
oznu committed May 3, 2020
1 parent 40b47a6 commit 10fc05a
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 32 deletions.
16 changes: 6 additions & 10 deletions WIZARD_UIFILES/install_uifile
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,16 @@
"items": [{
"type": "singleselect",
"subitems": [{
"key": "homebridge_pkgwizard_image_type_no_avahi",
"desc": "Alpine Linux (without Avahi)",
"defaultValue": true
},{
"key": "homebridge_pkgwizard_image_type_latest",
"desc": "Alpine Linux",
"defaultValue": false
"desc": "Alpine Linux (Recommended)",
"defaultValue": true
},{
"key": "homebridge_pkgwizard_image_type_debian_no_avahi",
"desc": "Debian Stretch (without Avahi)",
"key": "homebridge_pkgwizard_image_type_ubuntu_no_avahi",
"desc": "Ubuntu 18.04 (without Avahi)",
"defaultValue": false
},{
"key": "homebridge_pkgwizard_image_type_debian",
"desc": "Debian Stretch",
"key": "homebridge_pkgwizard_image_type_ubuntu",
"desc": "Ubuntu 18.04 (with Avahi)",
"defaultValue": false
}]
}]
Expand Down
16 changes: 6 additions & 10 deletions WIZARD_UIFILES/upgrade_uifile
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,16 @@
"items": [{
"type": "singleselect",
"subitems": [{
"key": "homebridge_pkgwizard_image_type_no_avahi",
"desc": "Alpine Linux (without Avahi)",
"defaultValue": true
},{
"key": "homebridge_pkgwizard_image_type_latest",
"desc": "Alpine Linux",
"defaultValue": false
"desc": "Alpine Linux (Recommended)",
"defaultValue": true
},{
"key": "homebridge_pkgwizard_image_type_debian_no_avahi",
"desc": "Debian Stretch (without Avahi)",
"key": "homebridge_pkgwizard_image_type_ubuntu_no_avahi",
"desc": "Ubuntu 18.04 (without Avahi)",
"defaultValue": false
},{
"key": "homebridge_pkgwizard_image_type_debian",
"desc": "Debian Stretch",
"key": "homebridge_pkgwizard_image_type_ubuntu",
"desc": "Ubuntu 18.04",
"defaultValue": false
}]
}]
Expand Down
8 changes: 4 additions & 4 deletions scripts/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ if [ "$SYNOPKG_PKG_STATUS" = "INSTALL" ]; then
# Set requested image type
if [ "$homebridge_pkgwizard_image_type_no_avahi" = "true" ]; then
echo "HOMEBRIDGE_DOCKER_TAG=no-avahi" >> "$SYNOPKG_PKGDEST/.env"
elif [ "$homebridge_pkgwizard_image_type_debian" = "true" ]; then
echo "HOMEBRIDGE_DOCKER_TAG=debian" >> "$SYNOPKG_PKGDEST/.env"
elif [ "$homebridge_pkgwizard_image_type_debian_no_avahi" = "true" ]; then
echo "HOMEBRIDGE_DOCKER_TAG=debian-no-avahi" >> "$SYNOPKG_PKGDEST/.env"
elif [ "$homebridge_pkgwizard_image_type_ubuntu" = "true" ]; then
echo "HOMEBRIDGE_DOCKER_TAG=ubuntu" >> "$SYNOPKG_PKGDEST/.env"
elif [ "$homebridge_pkgwizard_image_type_ubuntu_no_avahi" = "true" ]; then
echo "HOMEBRIDGE_DOCKER_TAG=ubuntu-no-avahi" >> "$SYNOPKG_PKGDEST/.env"
else
echo "HOMEBRIDGE_DOCKER_TAG=latest" >> "$SYNOPKG_PKGDEST/.env"
fi
Expand Down
16 changes: 8 additions & 8 deletions scripts/postupgrade
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ cp "$SYNOPKG_TEMP_UPGRADE_FOLDER/.env" "$SYNOPKG_PKGDEST/.env"
if grep -q "HOMEBRIDGE_DOCKER_TAG" "$SYNOPKG_PKGDEST/.env"; then
if [ "$homebridge_pkgwizard_image_type_no_avahi" = "true" ]; then
sed -i 's/HOMEBRIDGE_DOCKER_TAG=.*/HOMEBRIDGE_DOCKER_TAG=no-avahi/' "$SYNOPKG_PKGDEST/.env"
elif [ "$homebridge_pkgwizard_image_type_debian" = "true" ]; then
sed -i 's/HOMEBRIDGE_DOCKER_TAG=.*/HOMEBRIDGE_DOCKER_TAG=debian/' "$SYNOPKG_PKGDEST/.env"
elif [ "$homebridge_pkgwizard_image_type_debian_no_avahi" = "true" ]; then
sed -i 's/HOMEBRIDGE_DOCKER_TAG=.*/HOMEBRIDGE_DOCKER_TAG=debian-no-avahi/' "$SYNOPKG_PKGDEST/.env"
elif [ "$homebridge_pkgwizard_image_type_ubuntu" = "true" ]; then
sed -i 's/HOMEBRIDGE_DOCKER_TAG=.*/HOMEBRIDGE_DOCKER_TAG=ubuntu/' "$SYNOPKG_PKGDEST/.env"
elif [ "$homebridge_pkgwizard_image_type_ubuntu_no_avahi" = "true" ]; then
sed -i 's/HOMEBRIDGE_DOCKER_TAG=.*/HOMEBRIDGE_DOCKER_TAG=ubuntu-no-avahi/' "$SYNOPKG_PKGDEST/.env"
else
sed -i 's/HOMEBRIDGE_DOCKER_TAG=.*/HOMEBRIDGE_DOCKER_TAG=latest/' "$SYNOPKG_PKGDEST/.env"
fi
else
if [ "$homebridge_pkgwizard_image_type_no_avahi" = "true" ]; then
echo "HOMEBRIDGE_DOCKER_TAG=no-avahi" >> "$SYNOPKG_PKGDEST/.env"
elif [ "$homebridge_pkgwizard_image_type_debian" = "true" ]; then
echo "HOMEBRIDGE_DOCKER_TAG=debian" >> "$SYNOPKG_PKGDEST/.env"
elif [ "$homebridge_pkgwizard_image_type_debian_no_avahi" = "true" ]; then
echo "HOMEBRIDGE_DOCKER_TAG=debian-no-avahi" >> "$SYNOPKG_PKGDEST/.env"
elif [ "$homebridge_pkgwizard_image_type_ubuntu" = "true" ]; then
echo "HOMEBRIDGE_DOCKER_TAG=ubuntu" >> "$SYNOPKG_PKGDEST/.env"
elif [ "$homebridge_pkgwizard_image_type_ubuntu_no_avahi" = "true" ]; then
echo "HOMEBRIDGE_DOCKER_TAG=ubuntu-no-avahi" >> "$SYNOPKG_PKGDEST/.env"
else
echo "HOMEBRIDGE_DOCKER_TAG=latest" >> "$SYNOPKG_PKGDEST/.env"
fi
Expand Down

0 comments on commit 10fc05a

Please sign in to comment.