diff --git a/build/linux/usr/local/etc/omc/script/setup.sh b/build/linux/usr/local/etc/omc/script/setup.sh index b5ff685f..51942e99 100644 --- a/build/linux/usr/local/etc/omc/script/setup.sh +++ b/build/linux/usr/local/etc/omc/script/setup.sh @@ -78,7 +78,7 @@ fi if [ -n "$M_PARAM" ]; then # Check that mode is within the standard range if [[ "$M_PARAM" != "standard" && "$M_PARAM" != "lite" ]]; then - echo "Error: -m can only be 'standard' or 'lite'." + echo "Error: M_PARAM can only be 'standard' or 'lite'." exit 1 fi sed -i "s/MODE=.*/MODE=${M_PARAM}/" $VariableFile @@ -91,7 +91,7 @@ fi if [ -n "$C_PARAM" ]; then # Check if customize is within the standard if [[ "$C_PARAM" != "omc" && "$C_PARAM" != "agt" && "$C_PARAM" != "ba" ]]; then - echo "Error: -c can only be 'omc', 'agt' or 'ba'." + echo "Error: C_PARAM can only be 'omc', 'agt' or 'ba'." exit 1 fi sed -i "s/VENDORS=.*/VENDORS=${C_PARAM}/" $VariableFile @@ -101,9 +101,7 @@ fi # ========================= if [[ "$T_PARAM" == "install" && "$MODE" == "standard" ]]; then - if command -v mysql &> /dev/null || command -v mariadb &> /dev/null; then - echo "MySQL or MariaDB installed" - else + if ! command -v mysql &> /dev/null && ! command -v mariadb &> /dev/null; then echo "MySQL or MariaDB not installed" exit 1 fi diff --git a/build/pkg/deb/DEBIAN/postinst b/build/pkg/deb/DEBIAN/postinst index 257f5592..e65cee55 100644 --- a/build/pkg/deb/DEBIAN/postinst +++ b/build/pkg/deb/DEBIAN/postinst @@ -27,7 +27,7 @@ if [ ! -f $RootDir/omc.conf ]; then fi if [ $? -ne 0 ]; then echo "Initialization failure." - dpkg --purge omc + rm -rf $RootDir exit 1 fi