From ce4fd036af839284a72eaf0d8c31fa1a51a393aa Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Thu, 17 Jan 2019 13:44:21 +0100 Subject: [PATCH 1/9] Update check_process after integration in community repo on github --- check_process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_process b/check_process index 8c0af72..e06dd2e 100644 --- a/check_process +++ b/check_process @@ -32,7 +32,7 @@ # https://framagit.org/Mickael-Martin/zabbix_ynh/blob/master/scripts/install#L141 Level 4=1 Level 5=auto - Level 6=auto + Level 6=1 Level 7=auto Level 8=0 Level 9=0 From b650760f7ff601ed9b9d2fa440e531e8adf549b4 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Fri, 18 Jan 2019 13:56:08 +0100 Subject: [PATCH 2/9] Disable guest login --- scripts/install | 5 +++++ scripts/upgrade | 15 +++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/scripts/install b/scripts/install index ee24abe..c57b44e 100644 --- a/scripts/install +++ b/scripts/install @@ -170,6 +170,11 @@ lastid=$(mysql -u$db_user -p$db_pwd $db_name -BN -e "SELECT max(id) from \`users lastid=$(($lastid + 1 )) mysql -u$db_user -p$db_pwd $db_name -e "INSERT INTO \`users_groups\` (\`id\` , \`usrgrpid\`, \`userid\`) VALUES ($lastid ,9, 1);" +#disable default guest +lastid=$(mysql -u$db_user -p$db_pwd $db_name -BN -e "SELECT max(id) from \`users_groups\`") +lastid=$(($lastid + 1 )) +mysql -u$db_user -p$db_pwd $db_name -e "INSERT INTO \`users_groups\` (\`id\` , \`usrgrpid\`, \`userid\`) VALUES ($lastid ,9, 2);" + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index e3c7182..ab2d3a8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -66,6 +66,21 @@ else echo "default admin already disabled" fi +#================================================= +# Disable default guest for security issue +#================================================= +haveDefaultGuestDisabled=$(mysql -BN -u$db_user -p$db_pwd $db_name -BN -e "SELECT count(id) from \`users_groups\` where userid=2 and usrgrpid=9") + +if [ "$haveDefaultGuestDisabled" -eq 0 ] ;then + echo "Disable default guest" + #disable default guest + lastid=$(mysql -u$db_user -p$db_pwd $db_name -BN -e "SELECT max(id) from \`users_groups\`") + lastid=$(($lastid + 1 )) + mysql -u$db_user -p$db_pwd $db_name -e "INSERT INTO \`users_groups\` (\`id\` , \`usrgrpid\`, \`userid\`) VALUES ($lastid ,9, 2);" +else + echo "default guest already disabled" +fi + #================================================= # CHECK THE PATH #================================================= From e8e7aca653d7a10bffaed2f0ce54aa97df79a779 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Wed, 23 Jan 2019 08:59:24 +0100 Subject: [PATCH 3/9] Adding Yunohost Integration level cf : https://github.com/YunoHost-Apps/zabbix_ynh/pull/3 Thanks @yalh76 --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 98ba18e..589bcaa 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Integration level](https://dash.yunohost.org/integration/zabbix.svg)](https://ci-apps.yunohost.org/jenkins/job/zabbix%20%28Community%29/lastBuild/consoleFull) +[![Install zabbix with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=zabbix) > *This package allow you to install zabbix quickly and simply on a YunoHost server. If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.* From 74e1067b45228c965fb862c6c60e0a61c8254a9f Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Wed, 23 Jan 2019 09:00:38 +0100 Subject: [PATCH 4/9] Changing link from jenkins to CI cf https://github.com/YunoHost-Apps/zabbix_ynh/pull/4 Thanks to @yalh76 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 589bcaa..bc9f4d5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Integration level](https://dash.yunohost.org/integration/zabbix.svg)](https://ci-apps.yunohost.org/jenkins/job/zabbix%20%28Community%29/lastBuild/consoleFull) +[![Integration level](https://dash.yunohost.org/integration/zabbix.svg)](https://dash.yunohost.org/appci/app/zabbix) [![Install zabbix with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=zabbix) > *This package allow you to install zabbix quickly and simply on a YunoHost server. If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.* From 066ec6881a89355ad2375aa76bdc106469015047 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Tue, 5 Feb 2019 13:49:20 +0100 Subject: [PATCH 5/9] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index ab2d3a8..4b14181 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -14,7 +14,7 @@ source /usr/share/yunohost/helpers #================================================= app=$YNH_APP_INSTANCE_NAME -trustedversion="4.0.3-1+stretch" +trustedversion="1:4.0.4-1+stretch" domain=$(ynh_app_setting_get $app domain) path_url=$(ynh_app_setting_get $app path) admin=$(ynh_app_setting_get $app admin) From 369402602435aaea82a9d581f5d8fb70f6fdb1bd Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Thu, 14 Feb 2019 11:09:28 +0100 Subject: [PATCH 6/9] Update install --- scripts/install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index c57b44e..21525bc 100644 --- a/scripts/install +++ b/scripts/install @@ -347,7 +347,8 @@ systemctl enable zabbix-server && systemctl start zabbix-server ### - And the section "SETUP LOGROTATE" in the upgrade script # Use logrotate to manage application logfile(s) -ynh_use_logrotate +#native logrotate because install officials packages. +#ynh_use_logrotate #================================================= # ADVERTISE SERVICE IN ADMIN PANEL From b1d8fda4c8e48c7c3d58e55b94bd645620b5560c Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Thu, 14 Feb 2019 11:18:20 +0100 Subject: [PATCH 7/9] Update install (logrotate) --- scripts/install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index c57b44e..069c38f 100644 --- a/scripts/install +++ b/scripts/install @@ -347,7 +347,8 @@ systemctl enable zabbix-server && systemctl start zabbix-server ### - And the section "SETUP LOGROTATE" in the upgrade script # Use logrotate to manage application logfile(s) -ynh_use_logrotate +# no logrotate needed : officials packages include logrotate +# ynh_use_logrotate #================================================= # ADVERTISE SERVICE IN ADMIN PANEL From cd78326b99cd88f38334b1d0f8a9050b0f9cc01a Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Thu, 14 Feb 2019 11:19:02 +0100 Subject: [PATCH 8/9] Update upgrade (logrotate) --- scripts/upgrade | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 4b14181..7c1cce4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -94,6 +94,9 @@ path_url=$(ynh_normalize_url_path $path_url) ynh_package_update +#REMOVE DUPLICATE LOG ENTRY IN LOGROTATE PATCH IF NEEDED +ynh_remove_logrotate + zabbixServerInstalledVersion=$(apt-cache policy zabbix-server-mysql | grep -Po "Installed: \K(.*)") zabbixServerCandidateVersion=$(apt-cache policy zabbix-server-mysql | grep -Po "Candidate: \K(.*)") From d47bb1f8ae5a82e11fc341a7fd788c638ee0197c Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Thu, 14 Feb 2019 12:43:51 +0100 Subject: [PATCH 9/9] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index efd1a08..e7f1fff 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "YunoHost port for Zabbix", "fr": "Zabbix pour Yunohost" }, - "version": "1.0~ynh1", + "version": "1.2", "url": "https://framagit.org/Mickael-Martin/zabbix_ynh", "license": "free", "maintainer": {