From 4b3dce0d23057ffb4fa71d4992d921da4e81918c Mon Sep 17 00:00:00 2001 From: siwinter <45730097+siwinter@users.noreply.github.com> Date: Wed, 25 Aug 2021 13:41:07 +0200 Subject: [PATCH] MPD extension --- scripts/upgrade | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 37b6f95..a9fb8da 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -44,12 +44,18 @@ upgrade_type=$(ynh_check_app_version_changed) # some legacy installs and you therefore want to initiaze stuff during upgrade) # -# If db_name doesn't exist, create it +# If mpd_port doesn't exist, create it if [ -z "$mpd_port" ]; then mpd_port=0 ynh_app_setting_set --app=$app --key=mpd_port --value=$mpd_port fi +if [ $mpd_port -eq 0 ]; then + mpd_state="false" +else + mpd_state="true" +fi + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #=================================================