mirror of
https://github.com/YunoHost-Apps/zabbix_ynh.git
synced 2024-09-03 20:36:14 +02:00
Merge branch 'master' into 'testing'
Master See merge request Mickael-Martin/zabbix_ynh!12
This commit is contained in:
commit
3a6cedc4c2
5 changed files with 29 additions and 3 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
[](https://dash.yunohost.org/appci/app/zabbix)
|
||||||
|
[](https://install-app.yunohost.org/?app=zabbix)
|
||||||
> *This package allow you to install zabbix quickly and simply on a YunoHost server.
|
> *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.*
|
If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.*
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
# https://framagit.org/Mickael-Martin/zabbix_ynh/blob/master/scripts/install#L141
|
# https://framagit.org/Mickael-Martin/zabbix_ynh/blob/master/scripts/install#L141
|
||||||
Level 4=1
|
Level 4=1
|
||||||
Level 5=auto
|
Level 5=auto
|
||||||
Level 6=auto
|
Level 6=1
|
||||||
Level 7=auto
|
Level 7=auto
|
||||||
Level 8=0
|
Level 8=0
|
||||||
Level 9=0
|
Level 9=0
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "YunoHost port for Zabbix",
|
"en": "YunoHost port for Zabbix",
|
||||||
"fr": "Zabbix pour Yunohost"
|
"fr": "Zabbix pour Yunohost"
|
||||||
},
|
},
|
||||||
"version": "1.0~ynh1",
|
"version": "1.2",
|
||||||
"url": "https://framagit.org/Mickael-Martin/zabbix_ynh",
|
"url": "https://framagit.org/Mickael-Martin/zabbix_ynh",
|
||||||
"license": "free",
|
"license": "free",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
|
|
|
@ -168,6 +168,11 @@ do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
#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
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -346,7 +351,8 @@ yunohost service add zabbix-agent -d "Management of Zabbix Agent"
|
||||||
### - And the section "SETUP LOGROTATE" in the upgrade script
|
### - And the section "SETUP LOGROTATE" in the upgrade script
|
||||||
|
|
||||||
# Use logrotate to manage application logfile(s)
|
# Use logrotate to manage application logfile(s)
|
||||||
ynh_use_logrotate
|
#native logrotate because install officials packages.
|
||||||
|
#ynh_use_logrotate
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# ADVERTISE SERVICE IN ADMIN PANEL
|
# ADVERTISE SERVICE IN ADMIN PANEL
|
||||||
|
|
|
@ -158,6 +158,21 @@ else
|
||||||
fi
|
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
|
# CHECK THE PATH
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -171,6 +186,9 @@ path_url=$(ynh_normalize_url_path $path_url)
|
||||||
ynh_print_info "Check if new zabbix version is available on repo"
|
ynh_print_info "Check if new zabbix version is available on repo"
|
||||||
ynh_package_update
|
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(.*)")
|
zabbixServerInstalledVersion=$(apt-cache policy zabbix-server-mysql | grep -Po "Installed: \K(.*)")
|
||||||
zabbixServerCandidateVersion=$(apt-cache policy zabbix-server-mysql | grep -Po "Candidate: \K(.*)")
|
zabbixServerCandidateVersion=$(apt-cache policy zabbix-server-mysql | grep -Po "Candidate: \K(.*)")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue