From 49cedec2841cdb3ace893abf3a5ee2ecb588a7c3 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 24 Dec 2023 09:13:07 +0100 Subject: [PATCH 1/5] add smtp --- conf/ampache.cfg.php | 8 ++++---- manifest.toml | 3 ++- scripts/install | 2 +- scripts/upgrade | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/conf/ampache.cfg.php b/conf/ampache.cfg.php index 127698f..2aa6e62 100644 --- a/conf/ampache.cfg.php +++ b/conf/ampache.cfg.php @@ -1353,21 +1353,21 @@ mail_port = 25 ; Secure SMTP ; POSSIBLE VALUES: ssl tls ; DEFAULT: none -;mail_secure_smtp = tls +mail_secure_smtp = tls ; Enable SMTP authentication ; DEFAULT: "false" -;mail_auth = "true" +mail_auth = "true" ; SMTP username ; your mail auth username. ; DEFAULT: none -;mail_auth_user = "" +mail_auth_user = "__APP__" ; SMTP password ; your mail auth password. ; DEFAULT: none -;mail_auth_pass = "" +mail_auth_pass = "__MAIL_PWD__" ;######################################################### ; Abbreviation Filter # diff --git a/manifest.toml b/manifest.toml index 900877b..1206dd5 100644 --- a/manifest.toml +++ b/manifest.toml @@ -52,7 +52,8 @@ ram.runtime = "50M" autoupdate.strategy = "latest_github_tag" [resources.system_user] - + allow_email = true + [resources.install_dir] [resources.permissions] diff --git a/scripts/install b/scripts/install index 3e90867..46c259a 100644 --- a/scripts/install +++ b/scripts/install @@ -63,7 +63,7 @@ ynh_script_progression --message="Adding a configuration file..." --weight=2 ynh_add_config --template="ampache.cfg.php" --destination="$install_dir/config/ampache.cfg.php" -chmod 600 "$install_dir/config/ampache.cfg.php" +chmod 650 "$install_dir/config/ampache.cfg.php" chown $app: "$install_dir/config/ampache.cfg.php" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 9cdba68..ffade3b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -75,7 +75,7 @@ fi #ynh_add_config --template="ampache.cfg.php" --destination="$install_dir/config/ampache.cfg.php" -#chmod 600 "$install_dir/config/ampache.cfg.php" +#chmod 650 "$install_dir/config/ampache.cfg.php" #chown $app: "$install_dir/config/ampache.cfg.php" #================================================= From 4f079dd1a18c58aff1250fbfa785e72a14f49a76 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 24 Dec 2023 09:22:50 +0100 Subject: [PATCH 2/5] Update ampache.cfg.php --- conf/ampache.cfg.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/ampache.cfg.php b/conf/ampache.cfg.php index 2aa6e62..fe00253 100644 --- a/conf/ampache.cfg.php +++ b/conf/ampache.cfg.php @@ -832,7 +832,7 @@ show_footer_statistics = "true" ; (latest albums, shouts, albums of artist, ...) ; use_rss = false (values true | false) ; DEFAULT: "false" -;use_rss = "true" +use_rss = "true" ; This setting allows themes to overwrite PHP template files. This can be really ; dangerous. Do this only if you trust every theme in your themes/ directory. @@ -1353,7 +1353,7 @@ mail_port = 25 ; Secure SMTP ; POSSIBLE VALUES: ssl tls ; DEFAULT: none -mail_secure_smtp = tls +;mail_secure_smtp = tls ; Enable SMTP authentication ; DEFAULT: "false" From c274f72b8f1cdf486fa98f0645f70ce2f7d03407 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 24 Dec 2023 09:33:05 +0100 Subject: [PATCH 3/5] Update install --- scripts/install | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 46c259a..98e0122 100644 --- a/scripts/install +++ b/scripts/install @@ -87,8 +87,10 @@ 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 +#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 From 4c06cd5e5c42d39de52c952f1e3c53de3f28d82b Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 24 Dec 2023 09:45:18 +0100 Subject: [PATCH 4/5] cleaning --- scripts/install | 3 --- scripts/upgrade | 26 +++++++++++++------------- 2 files changed, 13 insertions(+), 16 deletions(-) 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 From 7ef0312a8325eec897ae501e5263bfc76c14f8e3 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 24 Dec 2023 09:46:39 +0100 Subject: [PATCH 5/5] Update tests.toml --- tests.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests.toml b/tests.toml index 2454163..1f76f82 100644 --- a/tests.toml +++ b/tests.toml @@ -6,6 +6,6 @@ test_format = 1.0 # Commits to test upgrade from # ------------------------------- - test_upgrade_from.4680975ce19dbf1fd4af2218d56cd12f43d0ae85.name = "Upgrade from 5.6.1" + test_upgrade_from.9e7d3efad869f727bbf2e52e4c2e57c40651a812.name = "Upgrade from 6.1.0"