From bf18b984b5f64c4aaf47a064648a1ae3d5e088de Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 29 Apr 2020 17:19:13 +0200 Subject: [PATCH 01/13] update to v 0.12.0 --- README.md | 2 +- README_fr.md | 2 +- conf/app.src | 4 ++-- manifest.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b9d2ec3..2314d5b 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to Lutim stores images and allows you to see them, download them or share them on social networks. Images are indefinitely stored unless you request that they will be deleted at first view or after 24 hours / one week / one month / one year. -**Shipped version:** 0.11.6 +**Shipped version:** 0.12.0 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 6e4cda1..62f8c49 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, merci de regarder [ici](https://yunohost.org/#/inst Lutim stocke les images et vous permet de les voir, de les télécharger ou de les partager sur les réseaux sociaux. Les images sont stockées indéfiniment à moins que vous ne demandiez qu'elles soient effacées à la première vue ou après 24 heures / une semaine / un mois / un an. -**Version embarquée:** 0.11.6 +**Version embarquée:** 0.12.0 ## Captures d'écran diff --git a/conf/app.src b/conf/app.src index ab8ab41..f60ad5f 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://framagit.org/fiat-tux/hat-softwares/lutim/-/archive/0.11.6/lutim-0.11.6.tar.gz -SOURCE_SUM=092fc5b914fc8a2dd46f7101fe94c493 +SOURCE_URL=https://framagit.org/fiat-tux/hat-softwares/lutim/-/archive/0.12.0/lutim-0.12.0.tar.gz +SOURCE_SUM=682eed6ddd9ba0421a5df87c555cd54e SOURCE_SUM_PRG=md5sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index a764961..c290eaf 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Self hosting images and sharing anonymous application", "fr": "Application d'hébergement et de partage d'images anonyme" }, - "version": "0.11.6~ynh4", + "version": "0.12.0~ynh1", "url": "https://lut.im", "license": "AGPL-3.0", "maintainer": { From 6927bc553c9c6a5badcfef904fe180cd0d959fbc Mon Sep 17 00:00:00 2001 From: Augustin Trancart Date: Thu, 21 May 2020 15:57:06 +0200 Subject: [PATCH 02/13] Fix unit type to forking --- conf/systemd.service | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index 7085887..9e9b08b 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -3,10 +3,9 @@ Description=Image hosting and sharing service After=network.target [Service] -Type=simple +Type=forking User=__APP__ Group=__APP__ -RemainAfterExit=yes WorkingDirectory=__FINALPATH__/ PIDFile=__FINALPATH__/script/hypnotoad.pid ExecStart=/usr/bin/carton exec hypnotoad script/lutim >> /var/log/lutim/production.log 2>&1 From 6db2542fe5768cd1d2c797424b41cc08326bbd9b Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 5 Oct 2020 22:02:46 +0200 Subject: [PATCH 03/13] Upgrade to 0.12.0 --- README.md | 10 ++++------ README_fr.md | 26 ++++++++++++-------------- conf/app.src | 6 +++--- manifest.json | 5 +++-- scripts/_common.sh | 4 +++- scripts/_variables | 4 ---- scripts/backup | 16 ++++++---------- scripts/change_url | 16 ++++++++-------- scripts/install | 10 ++++------ scripts/remove | 8 ++++---- scripts/restore | 8 +++----- scripts/upgrade | 2 -- 12 files changed, 50 insertions(+), 65 deletions(-) delete mode 100644 scripts/_variables diff --git a/README.md b/README.md index b9d2ec3..2677715 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to Lutim stores images and allows you to see them, download them or share them on social networks. Images are indefinitely stored unless you request that they will be deleted at first view or after 24 hours / one week / one month / one year. -**Shipped version:** 0.11.6 +**Shipped version:** 0.12.0 ## Screenshots @@ -23,7 +23,7 @@ Images are indefinitely stored unless you request that they will be deleted at f ## Configuration -Edit the file `/var/www/lutim/lutim.conf` to edit the configuration of Lutim. +Edit the file `/var/www/lutim/lutim.conf` to configure Lutim. Then reload the lutim service. ## Documentation @@ -39,9 +39,8 @@ Not relevant. #### Supported architectures -* x86-64b - [![](https://ci-apps.yunohost.org/ci/logs/lutim%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/lutim/) +* x86-64 - [![](https://ci-apps.yunohost.org/ci/logs/lutim%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/lutim/) * ARMv8-A - [![](https://ci-apps-arm.yunohost.org/ci/logs/lutim%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/lutim/) -* Buster x86-64b - [![](https://ci-buster.nohost.me/ci/logs/lutim%20%28Apps%29.svg)](https://ci-buster.nohost.me/ci/apps/lutim/) ## Limitations @@ -56,8 +55,7 @@ Not relevant. --- -Developers infos ----------------- +## Developers infos Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/lutim_ynh/tree/testing). diff --git a/README_fr.md b/README_fr.md index 6e4cda1..203f874 100644 --- a/README_fr.md +++ b/README_fr.md @@ -8,12 +8,12 @@ > *Ce package vous permet d'installer Lutim rapidement et simplement sur un serveur YunoHost. Si vous n'avez pas YunoHost, merci de regarder [ici](https://yunohost.org/#/install_fr) pour savoir comment l'installer et en profiter.* -## Résumé +## Vue d'ensemble Lutim stocke les images et vous permet de les voir, de les télécharger ou de les partager sur les réseaux sociaux. Les images sont stockées indéfiniment à moins que vous ne demandiez qu'elles soient effacées à la première vue ou après 24 heures / une semaine / un mois / un an. -**Version embarquée:** 0.11.6 +**Version embarquée :** 0.12.0 ## Captures d'écran @@ -23,13 +23,13 @@ Les images sont stockées indéfiniment à moins que vous ne demandiez qu'elles ## Configuration -Editez le fichier `/var/www/lutim/lutim.conf` pour éditer la configuration de Lutim. -Rechargez ensuite le service lutim. +Éditez le fichier `/var/www/lutim/lutim.conf` pour configurer Lutim. +Rechargez ensuite le service Lutim. ## Documentation - * Documentation officielle: https://framagit.org/luc/lutim/wikis/home - * Documentation YunoHost: Il n'y a pas d'autre documentation, n'hésitez pas à contribuer. + * Documentation officielle : https://framagit.org/luc/lutim/wikis/home + * Documentation YunoHost : https://yunohost.org/#/app_lutim_fr ## Fonctionnalités spécifiques à YunoHost @@ -39,9 +39,8 @@ Non applicable. #### Architectures supportées. -* x86-64b - [![](https://ci-apps.yunohost.org/ci/logs/lutim%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/lutim/) +* x86-64 - [![](https://ci-apps.yunohost.org/ci/logs/lutim%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/lutim/) * ARMv8-A - [![](https://ci-apps-arm.yunohost.org/ci/logs/lutim%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/lutim/) -* Buster x86-64b - [![](https://ci-buster.nohost.me/ci/logs/lutim%20%28Apps%29.svg)](https://ci-buster.nohost.me/ci/apps/lutim/) ## Limitations @@ -49,15 +48,14 @@ Non applicable. ## Liens - * Reporter un bug: https://github.com/YunoHost-Apps/lutim_ynh/issues - * Site de Lutim: https://lut.im/ - * Dépôt de Lutim: https://framagit.org/fiat-tux/hat-softwares/lutim - * Site de YunoHost: https://yunohost.org/ + * Reporter un bug : https://github.com/YunoHost-Apps/lutim_ynh/issues + * Site de Lutim : https://lut.im/ + * Dépôt de Lutim : https://framagit.org/fiat-tux/hat-softwares/lutim + * Site de YunoHost : https://yunohost.org/ --- -Informations à l'intention des développeurs ----------------- +## Informations à l'intention des développeurs Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/lutim_ynh/tree/testing). diff --git a/conf/app.src b/conf/app.src index ab8ab41..095066a 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,6 +1,6 @@ -SOURCE_URL=https://framagit.org/fiat-tux/hat-softwares/lutim/-/archive/0.11.6/lutim-0.11.6.tar.gz -SOURCE_SUM=092fc5b914fc8a2dd46f7101fe94c493 -SOURCE_SUM_PRG=md5sum +SOURCE_URL=https://framagit.org/fiat-tux/hat-softwares/lutim/-/archive/0.12.0/lutim-0.12.0.tar.gz +SOURCE_SUM=d431bf4c1fb2323cc4a51958f3f312e9bfe0a5d100afe2e7f99e1ce42f1a5d02 +SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true SOURCE_FILENAME= diff --git a/manifest.json b/manifest.json index f46c2a4..d0dc722 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Self hosting images and sharing anonymous application", "fr": "Application d'hébergement et de partage d'images anonyme" }, - "version": "0.11.6~ynh4", + "version": "0.12.0~ynh1", "url": "https://lut.im", "license": "AGPL-3.0", "maintainer": { @@ -54,7 +54,8 @@ }, "default": false, "help": { - "en": "If you set Lutim as public, everyone will be able to upload images and share them.
But even if not public, everyone can see an image from a link shared with your Lutim." + "en": "If you set Lutim as public, everyone will be able to upload images and share them.
But even if not public, everyone can see an image from a link shared with your Lutim.", + "fr": "Si vous définissez Lutim comme public, tout le monde pourra télécharger des images et les partager.
Mais même si ce n'est pas public, tout le monde peut voir une image à partir d'un lien partagé avec votre Lutim." } }, { diff --git a/scripts/_common.sh b/scripts/_common.sh index 3770c0f..c85111f 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,9 +1,11 @@ #!/bin/bash #================================================= -# PERSONAL HELPERS +# COMMON VARIABLES #================================================= +app_depencencies="carton perlmagick libpq-dev shared-mime-info" + #================================================= # BACKUP #================================================= diff --git a/scripts/_variables b/scripts/_variables deleted file mode 100644 index 6510e96..0000000 --- a/scripts/_variables +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -# Dependencies -app_depencencies="carton perlmagick libpq-dev shared-mime-info" diff --git a/scripts/backup b/scripts/backup index d6be7f4..68dd31c 100644 --- a/scripts/backup +++ b/scripts/backup @@ -19,7 +19,7 @@ ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --weight=2 +ynh_print_info --message="Loading installation settings..." app=$YNH_APP_INSTANCE_NAME @@ -27,11 +27,13 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) domain=$(ynh_app_setting_get --app=$app --key=domain) #================================================= -# STANDARD BACKUP STEPS +# DECLARE DATA AND CONF FILES TO BACKUP +#================================================= +ynh_print_info --message="Declaring files to be backed up..." + #================================================= # BACKUP THE APP MAIN DIR #================================================= -ynh_script_progression --message="Backing up the main app directory..." CHECK_SIZE "$final_path" ynh_backup --src_path="$final_path" @@ -39,30 +41,24 @@ ynh_backup --src_path="$final_path" #================================================= # BACKUP NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Backing up nginx web server configuration..." ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# SPECIFIC BACKUP #================================================= # BACKUP LOGROTATE #================================================= -ynh_script_progression --message="Backing up logrotate configuration" ynh_backup --src_path="/etc/logrotate.d/$app" #================================================= # BACKUP SYSTEMD #================================================= -ynh_script_progression --message="Backing up systemd configuration" ynh_backup --src_path="/etc/systemd/system/$app.service" #================================================= # BACKUP A CRON FILE #================================================= -ynh_script_progression --message="Backing up cron file" ynh_backup --src_path="/etc/cron.d/$app" @@ -70,4 +66,4 @@ ynh_backup --src_path="/etc/cron.d/$app" # END OF SCRIPT #================================================= -ynh_script_progression --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." --last +ynh_print_info --message="Backup script completed for Lutim. (YunoHost will then actually copy those files to the archive)." diff --git a/scripts/change_url b/scripts/change_url index 8bb481c..11bc9c5 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -33,7 +33,7 @@ port=$(ynh_app_setting_get --app=$app --key=port) #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before changing its url (may take a while)..." --weight=20 +ynh_script_progression --message="Backing up Lutim before changing its URL (may take a while)..." --weight=20 # Backup the current version of the app ynh_backup_before_upgrade @@ -79,21 +79,21 @@ fi #================================================= # MODIFY URL IN NGINX CONF #================================================= -ynh_script_progression --message="Updating nginx web server configuration..." --weight=2 +ynh_script_progression --message="Updating NGINX web server configuration..." --weight=2 nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf -# Change the path in the nginx config file +# Change the path in the NGINX config file if [ $change_path -eq 1 ] then - # Make a backup of the original nginx config file if modified + # Make a backup of the original NGINX config file if modified ynh_backup_if_checksum_is_different --file="$nginx_conf_path" - # Set global variables for nginx helper + # Set global variables for NGINX helper domain="$old_domain" path_url="$new_path" - # Create a dedicated nginx config + # Create a dedicated NGINX config ynh_add_nginx_config fi @@ -138,7 +138,7 @@ ynh_replace_string --match_string="\(^ *prefix.*=> '\).*" --replace_string="\1$n #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload @@ -163,4 +163,4 @@ ynh_maintenance_mode_OFF # END OF SCRIPT #================================================= -ynh_script_progression --message="Change of URL completed for $app" --last +ynh_script_progression --message="Change of URL completed for Lutim" --last diff --git a/scripts/install b/scripts/install index 749c212..303d192 100644 --- a/scripts/install +++ b/scripts/install @@ -7,8 +7,6 @@ #================================================= # Load common variables for all scripts. -source _variables - source _common.sh source /usr/share/yunohost/helpers @@ -88,9 +86,9 @@ ynh_install_app_dependencies $app_depencencies #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Configuring nginx web server..." --weight=2 +ynh_script_progression --message="Configuring NGINX web server..." --weight=2 -# Create a dedicated nginx config +# Create a dedicated NGINX config ynh_add_nginx_config #================================================= @@ -225,7 +223,7 @@ fi #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." --weight=2 +ynh_script_progression --message="Reloading NGINX web server..." --weight=2 ynh_systemd_action --service_name=nginx --action=reload @@ -264,4 +262,4 @@ ynh_send_readme_to_admin --app_message="mail_to_send" --recipients="root" --type # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of $app completed" --last +ynh_script_progression --message="Installation of Lutim completed" --last diff --git a/scripts/remove b/scripts/remove index 5c04deb..ca834b6 100644 --- a/scripts/remove +++ b/scripts/remove @@ -51,7 +51,7 @@ ynh_remove_app_dependencies #================================================= # REMOVE APP MAIN DIR #================================================= -ynh_script_progression --message="Removing app main directory..." --weight=2 +ynh_script_progression --message="Removing Lutim main directory..." --weight=2 # Remove the app directory securely ynh_secure_remove --file="$final_path" @@ -59,9 +59,9 @@ ynh_secure_remove --file="$final_path" #================================================= # REMOVE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Removing nginx web server configuration..." +ynh_script_progression --message="Removing NGINX web server configuration..." -# Remove the dedicated nginx config +# Remove the dedicated NGINX config ynh_remove_nginx_config #================================================= @@ -94,4 +94,4 @@ ynh_system_user_delete --username=$app # END OF SCRIPT #================================================= -ynh_script_progression --message="Removal of $app completed" --last +ynh_script_progression --message="Removal of Lutim completed" --last diff --git a/scripts/restore b/scripts/restore index d522562..829679a 100644 --- a/scripts/restore +++ b/scripts/restore @@ -7,8 +7,6 @@ #================================================= # Load common variables for all scripts. -source ../settings/scripts/_variables - source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -62,7 +60,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # RESTORE THE APP MAIN DIR #================================================= -ynh_script_progression --message="Restoring the app main directory..." +ynh_script_progression --message="Restoring Lutim main directory..." ynh_restore_file --origin_path="$final_path" @@ -130,7 +128,7 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app" #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." --weight=2 +ynh_script_progression --message="Reloading NGINX web server..." --weight=2 ynh_systemd_action --service_name=nginx --action=reload @@ -169,4 +167,4 @@ ynh_send_readme_to_admin --app_message="mail_to_send" --recipients="root" --type # END OF SCRIPT #================================================= -ynh_script_progression --message="Restoration completed for $app" --last +ynh_script_progression --message="Restoration completed for Lutim" --last diff --git a/scripts/upgrade b/scripts/upgrade index 309da4b..bccdbc2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -7,8 +7,6 @@ #================================================= # Load common variables for all scripts. -source _variables - source _common.sh source /usr/share/yunohost/helpers From 5800d7ca485e594328d2945b54386afbc05a582a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 18 Oct 2020 22:45:48 +0200 Subject: [PATCH 04/13] Upgrade to v.0.12.1 --- CHANGELOG.md | 4 +- README.md | 2 +- README_fr.md | 2 +- conf/app.src | 4 +- manifest.json | 4 +- scripts/_common.sh | 192 +++++---------------------------------------- scripts/install | 2 +- scripts/upgrade | 8 +- 8 files changed, 32 insertions(+), 186 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 416ed08..0298450 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ Changelog ========= -## Unreleased -- Nothing for now... +## [0.12.1~ynh1](https://github.com/YunoHost-Apps/lutim_ynh/pull/46) - 2020-10-18 +* [Update to Lutim 0.12.1](https://github.com/YunoHost-Apps/lutim_ynh/pull/52) ## [0.11.6~ynh4](https://github.com/YunoHost-Apps/lutim_ynh/pull/46) - 2020-04-25 diff --git a/README.md b/README.md index 2677715..5454c59 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to Lutim stores images and allows you to see them, download them or share them on social networks. Images are indefinitely stored unless you request that they will be deleted at first view or after 24 hours / one week / one month / one year. -**Shipped version:** 0.12.0 +**Shipped version:** 0.12.1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 203f874..79725c0 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, merci de regarder [ici](https://yunohost.org/#/inst Lutim stocke les images et vous permet de les voir, de les télécharger ou de les partager sur les réseaux sociaux. Les images sont stockées indéfiniment à moins que vous ne demandiez qu'elles soient effacées à la première vue ou après 24 heures / une semaine / un mois / un an. -**Version embarquée :** 0.12.0 +**Version embarquée :** 0.12.1 ## Captures d'écran diff --git a/conf/app.src b/conf/app.src index 095066a..11db593 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://framagit.org/fiat-tux/hat-softwares/lutim/-/archive/0.12.0/lutim-0.12.0.tar.gz -SOURCE_SUM=d431bf4c1fb2323cc4a51958f3f312e9bfe0a5d100afe2e7f99e1ce42f1a5d02 +SOURCE_URL=https://framagit.org/fiat-tux/hat-softwares/lutim/-/archive/0.12.1/lutim-0.12.1.tar.gz +SOURCE_SUM=141f142d47e3a8367e0c292304ddbecfc34b49ae7e561e2c3526000040318973 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index d0dc722..8e01235 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Self hosting images and sharing anonymous application", "fr": "Application d'hébergement et de partage d'images anonyme" }, - "version": "0.12.0~ynh1", + "version": "0.12.1~ynh1", "url": "https://lut.im", "license": "AGPL-3.0", "maintainer": { @@ -18,7 +18,7 @@ "email": "maniackc_dev@crudelis.fr" }], "requirements": { - "yunohost": ">= 3.7" + "yunohost": ">= 3.8.1" }, "multi_instance": false, "services": [ diff --git a/scripts/_common.sh b/scripts/_common.sh index c85111f..eadaee3 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -267,27 +267,27 @@ __PRE_TAG1__$(yunohost tools diagnosis | grep -B 100 "services:" | sed '/service #================================================= -ynh_debian_release () { - lsb_release --codename --short -} +# ynh_debian_release () { +# lsb_release --codename --short +# } -is_stretch () { - if [ "$(ynh_debian_release)" == "stretch" ] - then - return 0 - else - return 1 - fi -} +# is_stretch () { +# if [ "$(ynh_debian_release)" == "stretch" ] +# then +# return 0 +# else +# return 1 +# fi +# } -is_jessie () { - if [ "$(ynh_debian_release)" == "jessie" ] - then - return 0 - else - return 1 - fi -} +# is_jessie () { +# if [ "$(ynh_debian_release)" == "jessie" ] +# then +# return 0 +# else +# return 1 +# fi +# } #================================================= @@ -581,160 +581,6 @@ ynh_check_ram () { fi } -#================================================= - -# Define the values to configure php-fpm -# -# usage: ynh_get_scalable_phpfpm --usage=usage --footprint=footprint [--print] -# | arg: -f, --footprint - Memory footprint of the service (low/medium/high). -# low - Less than 20Mb of ram by pool. -# medium - Between 20Mb and 40Mb of ram by pool. -# high - More than 40Mb of ram by pool. -# Or specify exactly the footprint, the load of the service as Mb by pool instead of having a standard value. -# To have this value, use the following command and stress the service. -# watch -n0.5 ps -o user,cmd,%cpu,rss -u APP -# -# | arg: -u, --usage - Expected usage of the service (low/medium/high). -# low - Personal usage, behind the sso. -# medium - Low usage, few people or/and publicly accessible. -# high - High usage, frequently visited website. -# -# | arg: -p, --print - Print the result -# -# -# -# The footprint of the service will be used to defined the maximum footprint we can allow, which is half the maximum RAM. -# So it will be used to defined 'pm.max_children' -# A lower value for the footprint will allow more children for 'pm.max_children'. And so for -# 'pm.start_servers', 'pm.min_spare_servers' and 'pm.max_spare_servers' which are defined from the -# value of 'pm.max_children' -# NOTE: 'pm.max_children' can't exceed 4 times the number of processor's cores. -# -# The usage value will defined the way php will handle the children for the pool. -# A value set as 'low' will set the process manager to 'ondemand'. Children will start only if the -# service is used, otherwise no child will stay alive. This config gives the lower footprint when the -# service is idle. But will use more proc since it has to start a child as soon it's used. -# Set as 'medium', the process manager will be at dynamic. If the service is idle, a number of children -# equal to pm.min_spare_servers will stay alive. So the service can be quick to answer to any request. -# The number of children can grow if needed. The footprint can stay low if the service is idle, but -# not null. The impact on the proc is a little bit less than 'ondemand' as there's always a few -# children already available. -# Set as 'high', the process manager will be set at 'static'. There will be always as many children as -# 'pm.max_children', the footprint is important (but will be set as maximum a quarter of the maximum -# RAM) but the impact on the proc is lower. The service will be quick to answer as there's always many -# children ready to answer. -ynh_get_scalable_phpfpm () { - local legacy_args=ufp - # Declare an array to define the options of this helper. - declare -Ar args_array=( [u]=usage= [f]=footprint= [p]=print ) - local usage - local footprint - local print - # Manage arguments with getopts - ynh_handle_getopts_args "$@" - # Set all characters as lowercase - footprint=${footprint,,} - usage=${usage,,} - print=${print:-0} - - if [ "$footprint" = "low" ] - then - footprint=20 - elif [ "$footprint" = "medium" ] - then - footprint=35 - elif [ "$footprint" = "high" ] - then - footprint=50 - fi - - # Define the way the process manager handle child processes. - if [ "$usage" = "low" ] - then - php_pm=ondemand - elif [ "$usage" = "medium" ] - then - php_pm=dynamic - elif [ "$usage" = "high" ] - then - php_pm=static - else - ynh_die --message="Does not recognize '$usage' as an usage value." - fi - - # Get the total of RAM available, except swap. - local max_ram=$(ynh_check_ram --no_swap) - - less0() { - # Do not allow value below 1 - if [ $1 -le 0 ] - then - echo 1 - else - echo $1 - fi - } - - # Define pm.max_children - # The value of pm.max_children is the total amount of ram divide by 2 and divide again by the footprint of a pool for this app. - # So if php-fpm start the maximum of children, it won't exceed half of the ram. - php_max_children=$(( $max_ram / 2 / $footprint )) - # If process manager is set as static, use half less children. - # Used as static, there's always as many children as the value of pm.max_children - if [ "$php_pm" = "static" ] - then - php_max_children=$(( $php_max_children / 2 )) - fi - php_max_children=$(less0 $php_max_children) - - # To not overload the proc, limit the number of children to 4 times the number of cores. - local core_number=$(nproc) - local max_proc=$(( $core_number * 4 )) - if [ $php_max_children -gt $max_proc ] - then - php_max_children=$max_proc - fi - - if [ "$php_pm" = "dynamic" ] - then - # Define pm.start_servers, pm.min_spare_servers and pm.max_spare_servers for a dynamic process manager - php_min_spare_servers=$(( $php_max_children / 8 )) - php_min_spare_servers=$(less0 $php_min_spare_servers) - - php_max_spare_servers=$(( $php_max_children / 2 )) - php_max_spare_servers=$(less0 $php_max_spare_servers) - - php_start_servers=$(( $php_min_spare_servers + ( $php_max_spare_servers - $php_min_spare_servers ) /2 )) - php_start_servers=$(less0 $php_start_servers) - else - php_min_spare_servers=0 - php_max_spare_servers=0 - php_start_servers=0 - fi - - if [ $print -eq 1 ] - then - ynh_debug --message="Footprint=${footprint}Mb by pool." - ynh_debug --message="Process manager=$php_pm" - ynh_debug --message="Max RAM=${max_ram}Mb" - if [ "$php_pm" != "static" ]; then - ynh_debug --message="\nMax estimated footprint=$(( $php_max_children * $footprint ))" - ynh_debug --message="Min estimated footprint=$(( $php_min_spare_servers * $footprint ))" - fi - if [ "$php_pm" = "dynamic" ]; then - ynh_debug --message="Estimated average footprint=$(( $php_max_spare_servers * $footprint ))" - elif [ "$php_pm" = "static" ]; then - ynh_debug --message="Estimated footprint=$(( $php_max_children * $footprint ))" - fi - ynh_debug --message="\nRaw php-fpm values:" - ynh_debug --message="pm.max_children = $php_max_children" - if [ "$php_pm" = "dynamic" ]; then - ynh_debug --message="pm.start_servers = $php_start_servers" - ynh_debug --message="pm.min_spare_servers = $php_min_spare_servers" - ynh_debug --message="pm.max_spare_servers = $php_max_spare_servers" - fi - fi -} #================================================= diff --git a/scripts/install b/scripts/install index 303d192..dc2333e 100644 --- a/scripts/install +++ b/scripts/install @@ -246,7 +246,7 @@ ynh_systemd_action --action=restart --line_match="Manager.*started" --log_path=" # SEND A README FOR THE ADMIN #================================================= -# Get main domain and buid the url of the admin panel of the app. +# Get main domain and buid the URL of the admin panel of the app. admin_panel="https://$(grep portal_domain /etc/ssowat/conf.json | cut -d'"' -f4)/yunohost/admin/#/apps/$app" echo "You can find a config file at $final_path/lutim.conf diff --git a/scripts/upgrade b/scripts/upgrade index bccdbc2..2674aea 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -137,7 +137,7 @@ ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=15 +ynh_script_progression --message="Backing up Lutim before upgrading (may take a while)..." --weight=15 # Backup the current version of the app ynh_backup_before_upgrade @@ -191,7 +191,7 @@ ynh_install_app_dependencies $app_depencencies # Overwrite the nginx configuration only if it's allowed if [ $overwrite_nginx -eq 1 ] then - ynh_script_progression --message="Upgrading nginx web server configuration..." --weight=2 + ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2 ynh_add_nginx_config fi @@ -297,7 +297,7 @@ chown $app -R /var/log/$app #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload @@ -344,4 +344,4 @@ ynh_send_readme_to_admin --app_message="mail_to_send" --recipients="root" --type # END OF SCRIPT #================================================= -ynh_script_progression --message="Upgrade of $app completed" --last +ynh_script_progression --message="Upgrade of Lutim completed" --last From 93e24ecbf4f0955bb73c0e4eaba12a53140c5bd0 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 18 Oct 2020 22:55:32 +0200 Subject: [PATCH 05/13] Update remove --- scripts/remove | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/remove b/scripts/remove index ca834b6..c1d7449 100644 --- a/scripts/remove +++ b/scripts/remove @@ -36,7 +36,7 @@ ynh_remove_systemd_config # Check if the service is declared in YunoHost if ynh_exec_fully_quiet yunohost service status $app then - ynh_script_progression --message="Removing $app service..." + ynh_script_progression --message="Removing Lutim service..." yunohost service remove $app fi From d9e6711e2b9e6cd66f0a1e3976dfd05c7afb951f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 30 Oct 2020 14:44:55 +0100 Subject: [PATCH 06/13] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5454c59..5af2e80 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Then reload the lutim service. ## Documentation * Official documentation: https://framagit.org/luc/lutim/wikis/home - * YunoHost documentation: There no other documentations, feel free to contribute. + * YunoHost documentation: https://yunohost.org/#/app_lutim ## YunoHost specific features From fe14938ee65219ba4005321b691b2ce435e9dbc9 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 1 Nov 2020 14:31:10 +0100 Subject: [PATCH 07/13] Small fixes --- CHANGELOG.md | 3 +++ config_panel.toml | 10 +++++----- scripts/_common.sh | 2 +- scripts/backup | 2 ++ scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 4 ++-- 7 files changed, 15 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0298450..80f6cb1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,11 @@ Changelog ========= ## [0.12.1~ynh1](https://github.com/YunoHost-Apps/lutim_ynh/pull/46) - 2020-10-18 + +#### Changed * [Update to Lutim 0.12.1](https://github.com/YunoHost-Apps/lutim_ynh/pull/52) + ## [0.11.6~ynh4](https://github.com/YunoHost-Apps/lutim_ynh/pull/46) - 2020-04-25 #### Added diff --git a/config_panel.toml b/config_panel.toml index 2dc90df..b24d3b3 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -8,7 +8,7 @@ name = "Lutim configuration" name = "Lutim configuration" [main.configuration.always_encrypt] - ask = "Force the encryption of images ?" + ask = "Force the encryption of images?" type = "boolean" default = true @@ -28,19 +28,19 @@ name = "Lutim configuration" name = "Overwriting config files" [main.overwrite_files.overwrite_settings] - ask = "Overwrite the config file lutim.conf ?" + ask = "Overwrite the config file lutim.conf?" type = "boolean" default = true help = "If the file is overwritten, a backup will be created." [main.overwrite_files.overwrite_nginx] - ask = "Overwrite the nginx config file ?" + ask = "Overwrite the nginx config file?" type = "boolean" default = true help = "If the file is overwritten, a backup will be created." [main.overwrite_files.overwrite_systemd] - ask = "Overwrite the systemd config file ?" + ask = "Overwrite the systemd config file?" type = "boolean" default = true help = "If the file is overwritten, a backup will be created." @@ -49,7 +49,7 @@ name = "Lutim configuration" name = "Global configuration" [main.global_config.email_type] - ask = "Send HTML email to admin ?" + ask = "Send HTML email to admin?" type = "boolean" default = true help = "Allow app scripts to send HTML mails instead of plain text." diff --git a/scripts/_common.sh b/scripts/_common.sh index eadaee3..85f7a0c 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -app_depencencies="carton perlmagick libpq-dev shared-mime-info" +pkg_depencencies="carton perlmagick libpq-dev shared-mime-info" #================================================= # BACKUP diff --git a/scripts/backup b/scripts/backup index 68dd31c..f2d1f9e 100644 --- a/scripts/backup +++ b/scripts/backup @@ -44,6 +44,8 @@ ynh_backup --src_path="$final_path" ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" +#================================================= +# SPECIFIC BACKUP #================================================= # BACKUP LOGROTATE #================================================= diff --git a/scripts/install b/scripts/install index dc2333e..5011931 100644 --- a/scripts/install +++ b/scripts/install @@ -81,7 +81,7 @@ ynh_setup_source --dest_dir="$final_path" #================================================= ynh_script_progression --message="Installing dependencies..." --weight=60 -ynh_install_app_dependencies $app_depencencies +ynh_install_app_dependencies $pkg_depencencies #================================================= # NGINX CONFIGURATION diff --git a/scripts/restore b/scripts/restore index 829679a..1955f5b 100644 --- a/scripts/restore +++ b/scripts/restore @@ -86,7 +86,7 @@ chown -R $app: $final_path #================================================= ynh_script_progression --message="Reinstalling dependencies..." --weight=60 -ynh_install_app_dependencies $app_depencencies +ynh_install_app_dependencies $pkg_depencencies #================================================= # ADVERTISE SERVICE IN ADMIN PANEL diff --git a/scripts/upgrade b/scripts/upgrade index 2674aea..ea7c2f1 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -182,7 +182,7 @@ fi #================================================= ynh_script_progression --message="Upgrading dependencies..." --weight=9 -ynh_install_app_dependencies $app_depencencies +ynh_install_app_dependencies $pkg_depencencies #================================================= # NGINX CONFIGURATION @@ -272,7 +272,7 @@ ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_fil if [ "$upgrade_type" == "UPGRADE_APP" ] then - ynh_script_progression --message="Upgrading Lutim with carton..." --weight=4 + ynh_script_progression --message="Upgrading Lutim with Carton..." --weight=4 (cd $final_path carton install 2>&1 | tee -a "/var/log/$app/setup_carton.log") fi From f7d6ac7e2e7f57e0ecafeefd146e97531504da53 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 12 Nov 2020 15:30:00 +0100 Subject: [PATCH 08/13] Add $app instead of Lutim --- scripts/backup | 2 +- scripts/change_url | 4 ++-- scripts/install | 8 ++++---- scripts/remove | 6 +++--- scripts/restore | 6 +++--- scripts/upgrade | 8 ++++---- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/scripts/backup b/scripts/backup index f2d1f9e..aede58d 100644 --- a/scripts/backup +++ b/scripts/backup @@ -68,4 +68,4 @@ ynh_backup --src_path="/etc/cron.d/$app" # END OF SCRIPT #================================================= -ynh_print_info --message="Backup script completed for Lutim. (YunoHost will then actually copy those files to the archive)." +ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." diff --git a/scripts/change_url b/scripts/change_url index 11bc9c5..7aa7a5f 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -33,7 +33,7 @@ port=$(ynh_app_setting_get --app=$app --key=port) #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up Lutim before changing its URL (may take a while)..." --weight=20 +ynh_script_progression --message="Backing up $app before changing its URL (may take a while)..." --weight=20 # Backup the current version of the app ynh_backup_before_upgrade @@ -163,4 +163,4 @@ ynh_maintenance_mode_OFF # END OF SCRIPT #================================================= -ynh_script_progression --message="Change of URL completed for Lutim" --last +ynh_script_progression --message="Change of URL completed for $app" --last diff --git a/scripts/install b/scripts/install index 5011931..b0a75e1 100644 --- a/scripts/install +++ b/scripts/install @@ -104,7 +104,7 @@ ynh_system_user_create $app #================================================= # SETUP LUTIM #================================================= -ynh_script_progression --message="Configure Lutim" --weight=2 +ynh_script_progression --message="Configure $app" --weight=2 # Configure Lutim cp ../conf/lutim.conf.template "$final_path/lutim.conf" @@ -147,7 +147,7 @@ chmod +x $final_path/script/lutim #================================================= # INSTALL LUTIM WITH CARTON #================================================= -ynh_script_progression --message="Installing Lutim with Carton..." --weight=60 +ynh_script_progression --message="Installing $app with Carton..." --weight=60 mkdir -p /var/log/$app/ (cd $final_path @@ -230,7 +230,7 @@ ynh_systemd_action --service_name=nginx --action=reload #================================================= # CHECK LUTIM BOOTING #================================================= -ynh_script_progression --message="Restarting Lutim..." --weight=6 +ynh_script_progression --message="Restarting $app..." --weight=6 # Wait for lutim to be fully started ynh_systemd_action --action=restart --line_match="Manager.*started" --log_path="/var/log/$app/production.log" --timeout="120" @@ -262,4 +262,4 @@ ynh_send_readme_to_admin --app_message="mail_to_send" --recipients="root" --type # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of Lutim completed" --last +ynh_script_progression --message="Installation of $app completed" --last diff --git a/scripts/remove b/scripts/remove index c1d7449..2dab54d 100644 --- a/scripts/remove +++ b/scripts/remove @@ -36,7 +36,7 @@ ynh_remove_systemd_config # Check if the service is declared in YunoHost if ynh_exec_fully_quiet yunohost service status $app then - ynh_script_progression --message="Removing Lutim service..." + ynh_script_progression --message="Removing $app service..." yunohost service remove $app fi @@ -51,7 +51,7 @@ ynh_remove_app_dependencies #================================================= # REMOVE APP MAIN DIR #================================================= -ynh_script_progression --message="Removing Lutim main directory..." --weight=2 +ynh_script_progression --message="Removing $app main directory..." --weight=2 # Remove the app directory securely ynh_secure_remove --file="$final_path" @@ -94,4 +94,4 @@ ynh_system_user_delete --username=$app # END OF SCRIPT #================================================= -ynh_script_progression --message="Removal of Lutim completed" --last +ynh_script_progression --message="Removal of $app completed" --last diff --git a/scripts/restore b/scripts/restore index 1955f5b..b56896d 100644 --- a/scripts/restore +++ b/scripts/restore @@ -60,7 +60,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # RESTORE THE APP MAIN DIR #================================================= -ynh_script_progression --message="Restoring Lutim main directory..." +ynh_script_progression --message="Restoring $app main directory..." ynh_restore_file --origin_path="$final_path" @@ -135,7 +135,7 @@ ynh_systemd_action --service_name=nginx --action=reload #================================================= # START AND CHECK LUTIM BOOTING #================================================= -ynh_script_progression --message="Restarting Lutim..." --weight=3 +ynh_script_progression --message="Restarting $app..." --weight=3 # Wait for lutim to be fully started ynh_systemd_action --action=restart --line_match="Manager.*started" --log_path="/var/log/$app/production.log" --timeout="120" @@ -167,4 +167,4 @@ ynh_send_readme_to_admin --app_message="mail_to_send" --recipients="root" --type # END OF SCRIPT #================================================= -ynh_script_progression --message="Restoration completed for Lutim" --last +ynh_script_progression --message="Restoration completed for $app" --last diff --git a/scripts/upgrade b/scripts/upgrade index ea7c2f1..67be92a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -137,7 +137,7 @@ ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up Lutim before upgrading (may take a while)..." --weight=15 +ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=15 # Backup the current version of the app ynh_backup_before_upgrade @@ -208,7 +208,7 @@ ynh_system_user_create --username=$app #================================================= # SETUP LUTIM #================================================= -ynh_script_progression --message="Reconfiguring Lutim..." +ynh_script_progression --message="Reconfiguring $app..." # Overwrite the settings config file only if it's allowed if [ $overwrite_settings -eq 1 ] @@ -272,7 +272,7 @@ ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_fil if [ "$upgrade_type" == "UPGRADE_APP" ] then - ynh_script_progression --message="Upgrading Lutim with Carton..." --weight=4 + ynh_script_progression --message="Upgrading $app with Carton..." --weight=4 (cd $final_path carton install 2>&1 | tee -a "/var/log/$app/setup_carton.log") fi @@ -344,4 +344,4 @@ ynh_send_readme_to_admin --app_message="mail_to_send" --recipients="root" --type # END OF SCRIPT #================================================= -ynh_script_progression --message="Upgrade of Lutim completed" --last +ynh_script_progression --message="Upgrade of $app completed" --last From 232a31b5bb528e7edc04ae080310ee93000e8b64 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 18 Nov 2020 16:49:13 +0100 Subject: [PATCH 09/13] Update upgrade --- scripts/upgrade | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 67be92a..a589650 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -274,7 +274,8 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading $app with Carton..." --weight=4 (cd $final_path - carton install 2>&1 | tee -a "/var/log/$app/setup_carton.log") + ynh_secure_remove --file="$final_path/local" + carton install --deployment --without=mysql --without=htpasswd --without=test) fi #================================================= From e0164a9b199b1ce33780b4cc4e3f32cdb00c99ed Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 23 Nov 2020 08:45:29 +0100 Subject: [PATCH 10/13] Fix linter warnings --- scripts/backup | 1 - scripts/upgrade | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/backup b/scripts/backup index aede58d..22b5d7d 100644 --- a/scripts/backup +++ b/scripts/backup @@ -35,7 +35,6 @@ ynh_print_info --message="Declaring files to be backed up..." # BACKUP THE APP MAIN DIR #================================================= -CHECK_SIZE "$final_path" ynh_backup --src_path="$final_path" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index a589650..bcf226c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -295,6 +295,12 @@ ynh_script_progression --message="Upgrading logrotate configuration..." ynh_use_logrotate --non-append chown $app -R /var/log/$app +#================================================= +# ADVERTISE SERVICE IN ADMIN PANEL +#================================================= + +yunohost service add $app --log $final_path/log/production.log + #================================================= # RELOAD NGINX #================================================= From b251afb535143cb78f4016ad1886bc43c5535445 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 6 Dec 2020 11:33:26 +0100 Subject: [PATCH 11/13] Fix linter warnings --- scripts/_common.sh | 2 +- scripts/restore | 2 +- scripts/upgrade | 7 ------- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 85f7a0c..4f3a5f1 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -53,7 +53,7 @@ ynh_multimedia_build_main_dir () { local checksum="806a827ba1902d6911095602a9221181" # Download yunohost.multimedia scripts - wget -nv https://github.com/YunoHost-Apps/yunohost.multimedia/archive/${ynh_media_release}.tar.gz + wget -nv https://github.com/YunoHost-Apps/yunohost.multimedia/archive/${ynh_media_release}.tar.gz 2>&1 # Check the control sum echo "${checksum} ${ynh_media_release}.tar.gz" | md5sum -c --status \ diff --git a/scripts/restore b/scripts/restore index b56896d..1e3d5bf 100644 --- a/scripts/restore +++ b/scripts/restore @@ -100,7 +100,7 @@ yunohost service add $app --log $final_path/log/production.log ynh_script_progression --message="Restoring the systemd configuration..." ynh_restore_file --origin_path="/etc/systemd/system/$app.service" -systemctl enable $app.service +systemctl enable $app.service --quiet #================================================= # RESTORE THE CRON FILE diff --git a/scripts/upgrade b/scripts/upgrade index bcf226c..11eb8a3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -150,13 +150,6 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors -#================================================= -# CHECK THE PATH -#================================================= - -# Normalize the URL path syntax -path_url=$(ynh_normalize_url_path --path_url=$path_url) - #================================================= # ACTIVATE MAINTENANCE MODE #================================================= From dfe97ff3f3f1b67f54c67c26bc484d33aed8af78 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 9 Dec 2020 08:40:39 +0100 Subject: [PATCH 12/13] Fix service add $app --- scripts/install | 2 +- scripts/restore | 12 ++++++------ scripts/upgrade | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/install b/scripts/install index b0a75e1..c5d0bfa 100644 --- a/scripts/install +++ b/scripts/install @@ -191,7 +191,7 @@ ynh_use_logrotate # ADVERTISE SERVICE IN ADMIN PANEL #================================================= -yunohost service add $app --log $final_path/log/production.log +yunohost service add $app --log="$final_path/log/production.log" #================================================= # SETUP SSOWAT diff --git a/scripts/restore b/scripts/restore index 1e3d5bf..8a54f95 100644 --- a/scripts/restore +++ b/scripts/restore @@ -88,12 +88,6 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=60 ynh_install_app_dependencies $pkg_depencencies -#================================================= -# ADVERTISE SERVICE IN ADMIN PANEL -#================================================= - -yunohost service add $app --log $final_path/log/production.log - #================================================= # RESTORE SYSTEMD #================================================= @@ -117,6 +111,12 @@ mkdir -p /var/log/$app/ touch /var/log/$app/production.log chown $app -R /var/log/$app +#================================================= +# ADVERTISE SERVICE IN ADMIN PANEL +#================================================= + +yunohost service add $app --log="$final_path/log/production.log" + #================================================= # RESTORE LOGROTATE CONFIGURATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 11eb8a3..5fa528b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -292,7 +292,7 @@ chown $app -R /var/log/$app # ADVERTISE SERVICE IN ADMIN PANEL #================================================= -yunohost service add $app --log $final_path/log/production.log +yunohost service add $app --log="$final_path/log/production.log" #================================================= # RELOAD NGINX From 6eb57ae0701f471035481727f09475243d581ca4 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 18 Dec 2020 19:15:49 +0100 Subject: [PATCH 13/13] Set badge to use SVG --- README.md | 2 +- README_fr.md | 2 +- check_process | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5af2e80..a7241ee 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Lutim for YunoHost [![Integration level](https://dash.yunohost.org/integration/lutim.svg)](https://dash.yunohost.org/appci/app/lutim) ![](https://ci-apps.yunohost.org/ci/badges/lutim.status.svg) [![](https://ci-apps.yunohost.org/ci/badges/lutim.maintain.svg)](https://github.com/YunoHost/Apps/#what-to-do-if-i-cant-maintain-my-app-anymore-) -[![Install Lutim with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=lutim) +[![Install Lutim with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lutim) *[Lire ce readme en français.](./README_fr.md)* diff --git a/README_fr.md b/README_fr.md index 79725c0..52491e7 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,7 +1,7 @@ # Lutim pour YunoHost [![Niveau d'intégration](https://dash.yunohost.org/integration/lutim.svg)](https://dash.yunohost.org/appci/app/lutim) ![](https://ci-apps.yunohost.org/ci/badges/lutim.status.svg) [![](https://ci-apps.yunohost.org/ci/badges/lutim.maintain.svg)](https://github.com/YunoHost/Apps/#what-to-do-if-i-cant-maintain-my-app-anymore-) -[![Installer Lutim avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=lutim) +[![Installer Lutim avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lutim) *[Read this readme in english.](./README.md)* diff --git a/check_process b/check_process index 06ab3b9..6d1f2ae 100644 --- a/check_process +++ b/check_process @@ -28,8 +28,6 @@ change_url=1 actions=1 config_panel=1 -;;; Levels - Level 5=auto ;;; Options Email= Notification=change