diff --git a/README.md b/README.md index 1ec2179..59a69e9 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ It shall NOT be edited by hand. FreeScout is the super lightweight and powerful free open source help desk and shared inbox built with PHP (Laravel framework). Now you can enjoy free Zendesk & Help Scout without giving up privacy or locking yourself into a service you don't control. -**Shipped version:** 1.8.143~ynh1 +**Shipped version:** 1.8.144~ynh1 **Demo:** diff --git a/README_es.md b/README_es.md index e2d36be..dfb21f3 100644 --- a/README_es.md +++ b/README_es.md @@ -18,7 +18,7 @@ No se debe editar a mano. FreeScout is the super lightweight and powerful free open source help desk and shared inbox built with PHP (Laravel framework). Now you can enjoy free Zendesk & Help Scout without giving up privacy or locking yourself into a service you don't control. -**Versión actual:** 1.8.143~ynh1 +**Versión actual:** 1.8.144~ynh1 **Demo:** diff --git a/README_eu.md b/README_eu.md index 4968330..2a4cf7a 100644 --- a/README_eu.md +++ b/README_eu.md @@ -18,7 +18,7 @@ EZ editatu eskuz. FreeScout is the super lightweight and powerful free open source help desk and shared inbox built with PHP (Laravel framework). Now you can enjoy free Zendesk & Help Scout without giving up privacy or locking yourself into a service you don't control. -**Paketatutako bertsioa:** 1.8.143~ynh1 +**Paketatutako bertsioa:** 1.8.144~ynh1 **Demoa:** diff --git a/README_fr.md b/README_fr.md index 2b8fad2..ae9ff42 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Il NE doit PAS être modifié à la main. FreeScout est un service d'assistance open source gratuit ultra léger et puissant et une boîte de réception partagée construite avec PHP (framework Laravel). Vous pouvez désormais profiter gratuitement de Zendesk et Help Scout sans renoncer à votre confidentialité ni vous enfermer dans un service que vous ne contrôlez pas. -**Version incluse :** 1.8.143~ynh1 +**Version incluse :** 1.8.144~ynh1 **Démo :** diff --git a/README_gl.md b/README_gl.md index 695daff..68a1b06 100644 --- a/README_gl.md +++ b/README_gl.md @@ -18,7 +18,7 @@ NON debe editarse manualmente. FreeScout is the super lightweight and powerful free open source help desk and shared inbox built with PHP (Laravel framework). Now you can enjoy free Zendesk & Help Scout without giving up privacy or locking yourself into a service you don't control. -**Versión proporcionada:** 1.8.143~ynh1 +**Versión proporcionada:** 1.8.144~ynh1 **Demo:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index d9cb3af..6fd7547 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -18,7 +18,7 @@ FreeScout is the super lightweight and powerful free open source help desk and shared inbox built with PHP (Laravel framework). Now you can enjoy free Zendesk & Help Scout without giving up privacy or locking yourself into a service you don't control. -**分发版本:** 1.8.143~ynh1 +**分发版本:** 1.8.144~ynh1 **演示:** diff --git a/manifest.toml b/manifest.toml index e41f97e..5517343 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "FreeScout" description.en = "Help desk & shared mailbox" description.fr = "Service d'assistance et boîte aux lettres partagée" -version = "1.8.143~ynh1" +version = "1.8.144~ynh1" maintainers = [] @@ -50,8 +50,8 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - url = "https://github.com/freescout-helpdesk/freescout/archive/refs/tags/1.8.143.tar.gz" - sha256 = "ee4abf76475d2c4a239bb2c9e05b24a8b7184bdefc753a3478e9db8000d0e128" + url = "https://github.com/freescout-helpdesk/freescout/archive/refs/tags/1.8.144.tar.gz" + sha256 = "fd6c9f01803ee81a5d37c2a116d0a9a614418d354aded9641d7a2db1e1a3a23c" autoupdate.strategy = "latest_github_tag" [resources.system_user] diff --git a/scripts/backup b/scripts/backup index 4855526..f0fa96f 100755 --- a/scripts/backup +++ b/scripts/backup @@ -1,7 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= diff --git a/scripts/change_url b/scripts/change_url index 2e7a21c..dbcfe3d 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -1,7 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC STARTING #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -9,7 +7,6 @@ source _common.sh source /usr/share/yunohost/helpers - #================================================= # MODIFY URL IN NGINX CONF #================================================= @@ -18,14 +15,14 @@ ynh_script_progression --message="Updating NGINX web server configuration..." -- ynh_change_url_nginx_config #================================================= -# ADD A CONFIGURATION +# 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 +ynh_replace_string --match_string="APP_URL=https://$old_domain" --replace_string="APP_URL=https://$new_domain" \ + --target_file="$install_dir/.env" -pushd $install_dir - php$phpversion artisan freescout:clear-cache +pushd "$install_dir" + "php$phpversion" artisan freescout:clear-cache popd #================================================= diff --git a/scripts/install b/scripts/install index 57e8e48..0268229 100755 --- a/scripts/install +++ b/scripts/install @@ -1,7 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -9,13 +7,15 @@ source _common.sh source /usr/share/yunohost/helpers -email=$(ynh_user_get_info --username=$admin --key=mail) -firstname=$(yunohost user list --fields firstname --output-as json | jq -r .users.$admin.firstname) -lastname=$(yunohost user list --fields lastname --output-as json | jq -r .users.$admin.lastname) +#================================================= +# INITIALIZE AND STORE SETTINGS +#================================================= + +email=$(ynh_user_get_info --username="$admin" --key="mail") +firstname=$(ynh_user_get_info --username="$admin" --key="firstname") +lastname=$(ynh_user_get_info --username="$admin" --key="lastname") timezone=$(cat /etc/timezone) -#================================================= -# APP "BUILD" (DEPLOYING SOURCES, VENV, COMPILING ETC) #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -23,12 +23,20 @@ ynh_script_progression --message="Setting up source files..." --weight=1 ynh_setup_source --dest_dir="$install_dir" -chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" +chmod ug=rwX,o-rwx "$install_dir" +chown -R "$app:www-data" "$install_dir" -usermod -g www-data $app -find $install_dir -type f -exec chmod 664 {} \; -find $install_dir -type d -exec chmod 775 {} \; +usermod -g www-data "$app" + +#================================================= +# APP INITIAL CONFIGURATION +#================================================= +ynh_script_progression --message="Adding $app's configuration files..." --weight=1 + +ynh_add_config --template=".env.example" --destination="$install_dir/.env" + +chmod 600 "$install_dir/.env" +chown "$app:$app" "$install_dir/.env" #================================================= # SYSTEM CONFIGURATION @@ -43,32 +51,20 @@ ynh_add_config --template="cron" --destination="/etc/cron.d/$app" chown root: "/etc/cron.d/$app" chmod 644 "/etc/cron.d/$app" -#================================================= -# APP INITIAL CONFIGURATION -#================================================= -# ADD A CONFIGURATION -#================================================= -ynh_script_progression --message="Adding a configuration file..." --weight=1 - -ynh_add_config --template=".env.example" --destination="$install_dir/.env" - -chmod 600 "$install_dir/.env" -chown $app:$app "$install_dir/.env" - #================================================= # FINAL FREESCOUT INSTALL #================================================= -ynh_script_progression --message="Install $app" --weight=5 +ynh_script_progression --message="Finalizing $app installation..." --weight=1 -pushd $install_dir - php$phpversion artisan key:generate --no-interaction --force - php$phpversion artisan freescout:clear-cache - php$phpversion artisan storage:link - php$phpversion artisan migrate --no-interaction --force - php$phpversion artisan freescout:create-user --role=admin --firstName=$firstname --lastName=$lastname --email=$email --password=$password --no-interaction - - chgrp -R www-data storage bootstrap/cache public/css/builds public/js/builds - chmod -R ug+rwx storage bootstrap/cache public/css/builds public/js/builds +pushd "$install_dir" + "php$phpversion" artisan key:generate --no-interaction --force + "php$phpversion" artisan freescout:clear-cache + "php$phpversion" artisan storage:link + "php$phpversion" artisan migrate --no-interaction --force + "php$phpversion" artisan freescout:create-user --role="admin" --firstName="$firstname" --lastName="$lastname" --email="$email" --password="$password" --no-interaction + + chgrp -R www-data storage bootstrap/cache public/css/builds public/js/builds + chmod -R ug+rwx storage bootstrap/cache public/css/builds public/js/builds popd #================================================= diff --git a/scripts/remove b/scripts/remove index 80a76a5..6d5eb43 100755 --- a/scripts/remove +++ b/scripts/remove @@ -1,7 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -10,9 +8,7 @@ source _common.sh source /usr/share/yunohost/helpers #================================================= -# REMOVE SYSTEM CONFIGURATIONS -#================================================= -# REMOVE SYSTEMD SERVICE +# REMOVE SYSTEMD SERVICE #================================================= ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 diff --git a/scripts/restore b/scripts/restore index 79137eb..4928237 100755 --- a/scripts/restore +++ b/scripts/restore @@ -1,7 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -17,21 +15,18 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$install_dir" -chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" +chown -R "$app:www-data" "$install_dir" #================================================= # RESTORE THE MYSQL DATABASE #================================================= ynh_script_progression --message="Restoring the MySQL database..." --weight=1 -ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql +ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" < ./db.sql #================================================= # RESTORE SYSTEM CONFIGURATIONS #================================================= -# RESTORE THE PHP-FPM CONFIGURATION -#================================================= ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" @@ -40,14 +35,12 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/cron.d/$app" -#================================================= -# GENERIC FINALIZATION #================================================= # RELOAD NGINX AND PHP-FPM OR THE APP SERVICE #================================================= ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1 -ynh_systemd_action --service_name=php$phpversion-fpm --action=reload +ynh_systemd_action --service_name="php$phpversion-fpm" --action=reload ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index 7959b36..d5d0467 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,7 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -9,23 +7,26 @@ source _common.sh source /usr/share/yunohost/helpers -email=$(ynh_user_get_info --username=$admin --key=mail) -firstname=$(ynh_user_get_info --username=$admin --key=firstname) -lastname=$(ynh_user_get_info --username=$admin --key=lastname) - #================================================= -# "REBUILD" THE APP (DEPLOY NEW SOURCES, RERUN NPM BUILD...) +# INITIALIZE AND STORE SETTINGS +#================================================= + +email=$(ynh_user_get_info --username="$admin" --key="mail") +firstname=$(ynh_user_get_info --username="$admin" --key="firstname") +lastname=$(ynh_user_get_info --username="$admin" --key="lastname") + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= ynh_script_progression --message="Upgrading source files..." --weight=1 -ynh_secure_remove --file="/$install_dir/vendor" +# FIXME: use --full_replace=1 +ynh_secure_remove --file="$install_dir/vendor" -ynh_setup_source --dest_dir="$install_dir" # --full_replace=1 --keep='.env' +ynh_setup_source --dest_dir="$install_dir" --keep=".env" #--full_replace=1 chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" +chown -R "$app:www-data" "$install_dir" #================================================= # REAPPLY SYSTEM CONFIGURATIONS @@ -36,26 +37,14 @@ ynh_add_fpm_config ynh_add_nginx_config -#================================================= -# RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS...) -#================================================= -# UPDATE A CONFIG FILE -#================================================= -#ynh_script_progression --message="Updating a configuration file..." --weight=1 - -#ynh_add_config --template=".env.example" --destination="$install_dir/.env" - -#chmod 400 "$install_dir/.env" -#chown $app:$app "$install_dir/.env" - #================================================= # FINAL FREESCOUT INSTALL #================================================= ynh_script_progression --message="Install $app" --weight=5 -pushd $install_dir - php$phpversion artisan freescout:clear-cache - php$phpversion artisan migrate --no-interaction --force +pushd "$install_dir" + "php$phpversion" artisan freescout:clear-cache + "php$phpversion" artisan migrate --no-interaction --force popd #=================================================