diff --git a/scripts/install b/scripts/install index 98e0122..9bc2150 100644 --- a/scripts/install +++ b/scripts/install @@ -87,9 +87,6 @@ ynh_local_curl /update.php?action=update #================================================= ynh_script_progression --message="Loading admin database..." --weight=2 -#cp ../conf/admin.sql /tmp/ -#ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file=/tmp/admin.sql - ynh_add_config --template="admin.sql" --destination="/tmp/admin.sql" ynh_mysql_connect_as --user=$db_user --password="$db_pwd" --database=$db_name < /tmp/admin.sql diff --git a/scripts/upgrade b/scripts/upgrade index ffade3b..f95ee28 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -36,7 +36,7 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=3 - ynh_setup_source --dest_dir="$install_dir" --keep="config/ampache.cfg.php" + ynh_setup_source --dest_dir="$install_dir" #--keep="config/ampache.cfg.php" fi chmod -R o-rwx "$install_dir" @@ -63,20 +63,20 @@ then # Install composer ynh_install_composer --workdir=$install_dir - ynh_composer_exec --phpversion="${YNH_PHP_VERSION}" --workdir="$install_dir" --commands="config discard-changes true" + ynh_composer_exec --workdir="$install_dir" --commands="config discard-changes true" fi #================================================= # UPDATE A CONFIG FILE #================================================= -#ynh_script_progression --message="Updating a configuration file..." --weight=1 +ynh_script_progression --message="Updating a configuration file..." --weight=1 -#(cd $install_dir && ynh_exec_as "$app" php$phpversion bin/cli admin:updateDatabase -e) +(cd $install_dir && ynh_exec_as "$app" php$phpversion bin/cli admin:updateDatabase -e) -#ynh_add_config --template="ampache.cfg.php" --destination="$install_dir/config/ampache.cfg.php" +ynh_add_config --template="ampache.cfg.php" --destination="$install_dir/config/ampache.cfg.php" -#chmod 650 "$install_dir/config/ampache.cfg.php" -#chown $app: "$install_dir/config/ampache.cfg.php" +chmod 650 "$install_dir/config/ampache.cfg.php" +chown $app: "$install_dir/config/ampache.cfg.php" #================================================= # UPDATE MULTIMEDIA DIRECTORIES @@ -89,12 +89,12 @@ ynh_multimedia_build_main_dir # UPGRADE AMPACHE WITH CURL #================================================= -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_local_curl /update.php?action=update - sleep 1 - (cd $install_dir && ynh_exec_as "$app" php$phpversion bin/cli admin:updateDatabase -e) -fi +#if [ "$upgrade_type" == "UPGRADE_APP" ] +#then +# ynh_local_curl /update.php?action=update +# sleep 1 +# (cd $install_dir && ynh_exec_as "$app" php$phpversion bin/cli admin:updateDatabase -e) +#fi #================================================= # GENERIC FINALIZATION