From 2d64520b0090fcbcd3e81391f6b121281874af91 Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 15 Feb 2024 22:53:54 +0100 Subject: [PATCH] Mail (#37) * Update snipeit.env * Update manifest.toml * Update manifest.toml * fix * Update tests.toml * cleaning * Auto-update README * Update change_url --------- Co-authored-by: yunohost-bot --- conf/snipeit.env | 8 ++++---- manifest.toml | 4 ++++ scripts/change_url | 30 ++++++++++++++++++++++++++++++ tests.toml | 3 ++- 4 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 scripts/change_url diff --git a/conf/snipeit.env b/conf/snipeit.env index 3afd353..a0d057d 100644 --- a/conf/snipeit.env +++ b/conf/snipeit.env @@ -48,12 +48,12 @@ DB_SSL_CIPHER=null MAIL_DRIVER=mail MAIL_HOST=127.0.0.1 MAIL_PORT=25 -MAIL_USERNAME= -MAIL_PASSWORD= +MAIL_USERNAME=__APP__ +MAIL_PASSWORD=__MAIL_PWD__ MAIL_ENCRYPTION=null -MAIL_FROM_ADDR=snipeit@__DOMAIN__ +MAIL_FROM_ADDR=__APP__@__DOMAIN__ MAIL_FROM_NAME='Snip-IT' -MAIL_REPLYTO_ADDR=snipeit@__DOMAIN__ +MAIL_REPLYTO_ADDR=__APP__@__DOMAIN__ MAIL_REPLYTO_NAME='Snipe-IT' MAIL_AUTO_EMBED_METHOD='attachment' diff --git a/manifest.toml b/manifest.toml index b2fe01f..bad840e 100644 --- a/manifest.toml +++ b/manifest.toml @@ -23,8 +23,11 @@ fund = "https://snipeitapp.com/donate" yunohost = ">= 11.2" architectures = "all" multi_instance = false + ldap = false + sso = false + disk = "200M" ram.build = "150M" ram.runtime = "50M" @@ -52,6 +55,7 @@ ram.runtime = "50M" autoupdate.strategy = "latest_github_tag" [resources.system_user] + allow_email = true [resources.install_dir] diff --git a/scripts/change_url b/scripts/change_url new file mode 100644 index 0000000..fa9cbef --- /dev/null +++ b/scripts/change_url @@ -0,0 +1,30 @@ +#!/bin/bash + +#================================================= +# GENERIC STARTING +#================================================= +# IMPORT GENERIC HELPERS +#================================================= + +source _common.sh +source /usr/share/yunohost/helpers + +#================================================= +# MODIFY URL IN NGINX CONF +#================================================= +ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1 + +ynh_change_url_nginx_config + +#================================================= +# SPECIFIC MODIFICATIONS +#================================================= +ynh_script_progression --message="Adding a configuration file..." --weight=1 + +ynh_replace_string --match_string="APP_URL=https://$old_domain" --replace_string="APP_URL=https://$new_domain" --target_file=$install_dir/.env + +#================================================= +# END OF SCRIPT +#================================================= + +ynh_script_progression --message="Change of URL completed for $app" --last diff --git a/tests.toml b/tests.toml index f00fcf4..d7e464b 100644 --- a/tests.toml +++ b/tests.toml @@ -2,9 +2,10 @@ test_format = 1.0 [default] - exclude = ["install.subdir", "install.nourl", "change_url"] + exclude = ["install.subdir"] test_upgrade_from.ebf4c0a.name = "Upgrade from 5.3.1~ynh3 (manifest v1)" + test_upgrade_from.ebf4c0a.args.domain="domain.tld" test_upgrade_from.ebf4c0a.args.is_public=1 test_upgrade_from.ebf4c0a.args.language="fr"