diff --git a/README.md b/README.md index 135c285..63e633a 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ _netdata is **fast** and **efficient**, designed to permanently run on all syste (**physical** & **virtual** servers, **containers**, **IoT** devices), without disrupting their core function._ -**Shipped version:** 1.30.0 +**Shipped version:** 1.31.0 **Customization brought by the package:** diff --git a/conf/app.src b/conf/app.src index a43845e..d9f50fb 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,3 +1,3 @@ -SOURCE_URL=https://github.com/netdata/netdata/releases/download/v1.30.0/netdata-v1.30.0.tar.gz -SOURCE_SUM=711c9ce7a5b34c4e05dee8b2b034896f995cf5360eedca8b1d7375e0d33d9f59 +SOURCE_URL=https://github.com/netdata/netdata/releases/download/v1.31.0/netdata-v1.31.0.tar.gz +SOURCE_SUM=ca68f725224e8bbec041b493891376fbf41aedb47c4ac06161c2eda990089c9f SOURCE_FORMAT=tar.gz diff --git a/manifest.json b/manifest.json index 5f26f11..bf4aa24 100644 --- a/manifest.json +++ b/manifest.json @@ -3,10 +3,10 @@ "id": "netdata", "packaging_format": 1, "description": { - "en": "real-time performance and health monitoring", + "en": "Real-time performance and health monitoring", "fr": "Monitoring serveur en temps reel" }, - "version": "1.30.0~ynh1", + "version": "1.31.0~ynh1", "url": "http://my-netdata.io/", "license": "GPL-3.0", "maintainer": { @@ -15,7 +15,7 @@ "url": "" }, "requirements": { - "yunohost": ">= 3.8.1" + "yunohost": ">= 4.2.0" }, "multi_instance": false, "services": [ @@ -26,38 +26,22 @@ { "name": "domain", "type": "domain", - "ask": { - "en": "Choose a domain for NetData", - "fr": "Choisissez un nom de domaine pour NetData" - }, "example": "domain.org" }, { "name": "path", "type": "path", - "ask": { - "en": "Choose a path for NetData", - "fr": "Choisissez un chemin pour NetData" - }, "example": "/netdata", "default": "/netdata" }, { "name": "is_public", "type": "boolean", - "ask": { - "en": "Is it a public application?", - "fr": "Est-ce une application publique ?" - }, "default": false }, { "name": "admin", "type": "user", - "ask": { - "en": "Choose the only user initially allowed (others can be added later)", - "fr": "Choisissez l'unique utilisateur autorisé initialement (d'autres peuvent être ajoutés ultérieurement)" - }, "example": "johndoe" } ] diff --git a/scripts/change_url b/scripts/change_url index 03eb0e7..0e972b4 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -24,14 +24,14 @@ app=$YNH_APP_INSTANCE_NAME #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --time --weight=1 +ynh_script_progression --message="Loading installation settings..." --weight=1 final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before changing its url (may take a while)..." --time --weight=1 +ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1 # Backup the current version of the app ynh_backup_before_upgrade @@ -118,7 +118,7 @@ ynh_systemd_action --service_name=$app --action="restart" --log_path="$final_pat #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." --weight=1 +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/install b/scripts/install index f8ed301..9014d25 100644 --- a/scripts/install +++ b/scripts/install @@ -51,7 +51,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=1 ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=admin --value=$admin -ynh_app_setting_set --app=$app --key=is_public --value=$is_public #================================================= # STANDARD MODIFICATIONS @@ -81,9 +80,7 @@ ynh_setup_source --dest_dir="$NETDATA_TMPDIR" #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Configuring nginx web server..." --weight=2 - -### `ynh_add_nginx_config` will use the file conf/nginx.conf +ynh_script_progression --message="Configuring NGINX web server..." --weight=2 # Create a dedicated nginx config ynh_add_nginx_config @@ -112,8 +109,6 @@ configure_netdata #================================================= # GENERIC FINALIZATION -#================================================= - #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= @@ -131,7 +126,7 @@ ynh_systemd_action --service_name=$app --action="restart" --log_path="$final_pat #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." --weight=1 +ynh_script_progression --message="Configuring permissions..." --weight=1 # Make app public if necessary if [ $is_public -eq 1 ]; then @@ -146,7 +141,7 @@ ynh_permission_update --permission "main" --add "$admin" #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." --weight=1 +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/remove b/scripts/remove index 23af483..0eb6031 100644 --- a/scripts/remove +++ b/scripts/remove @@ -71,19 +71,11 @@ ynh_mysql_execute_as_root "drop user 'netdata'@'localhost'; flush privileges;" #================================================= # REMOVE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Removing nginx web server configuration..." --weight=1 +ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 # Remove the dedicated nginx config ynh_remove_nginx_config -#================================================= -# SPECIFIC REMOVE -#================================================= - -#================================================= -# GENERIC FINALIZATION -#================================================= - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/restore b/scripts/restore index 0264b38..d90fc1b 100644 --- a/scripts/restore +++ b/scripts/restore @@ -101,7 +101,7 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="$final_path/ #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." --weight=1 +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index 72aaccf..de46c33 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -19,7 +19,6 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) admin=$(ynh_app_setting_get --app=$app --key=admin) -is_public=$(ynh_app_setting_get --app=$app --key=is_public) final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= @@ -33,15 +32,6 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 -# Fix is_public as a boolean value -if [ "$is_public" = "Yes" ]; then - ynh_app_setting_set --app=$app --key=is_public --value=1 - is_public=1 -elif [ "$is_public" = "No" ]; then - ynh_app_setting_set --app=$app --key=is_public --value=0 - is_public=0 -fi - # If final_path doesn't exist, create it if [ -z "$final_path" ]; then final_path=/opt/$app @@ -55,6 +45,13 @@ if [[ $final_path == /var/www* ]]; then ynh_app_setting_set --app=$app --key=final_path --value=$final_path fi +# Cleaning legacy permissions +if ynh_legacy_permissions_exists; then + ynh_legacy_permissions_delete_all + + ynh_app_setting_delete --app=$app --key=is_public +fi + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= @@ -71,8 +68,6 @@ ynh_abort_if_errors #================================================= # STANDARD UPGRADE STEPS -#================================================= - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -118,7 +113,7 @@ configure_netdata #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading nginx web server configuration..." --weight=1 +ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 # Create a dedicated nginx config ynh_add_nginx_config @@ -140,18 +135,6 @@ ynh_install_app_dependencies $pkg_dependencies yunohost service add $app --description "Real-time performance and health monitoring for systems and applications" --log "$final_path/var/log/netdata/error.log" "$final_path/var/log/netdata/access.log" "$final_path/var/log/netdata/debug.log" -#================================================= -# SETUP SSOWAT -#================================================= -ynh_script_progression --message="Upgrading SSOwat configuration..." --weight=1 - -# Make app public if necessary -if [[ $is_public -eq 1 ]]; then - # Everyone can access the app. - # The "main" permission is automatically created before the install script. - ynh_permission_update --permission "main" --add "visitors" -fi - #================================================= # START SYSTEMD SERVICE #================================================= @@ -162,7 +145,7 @@ ynh_systemd_action --service_name=$app --action="restart" --log_path="$final_pat #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." --weight=1 +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload