mirror of
https://github.com/YunoHost-Apps/zabbix_ynh.git
synced 2024-09-03 20:36:14 +02:00
Merge branch 'add_media_type_email' into 'master'
Add media type email See merge request Mickael-Martin/zabbix_ynh!39
This commit is contained in:
commit
833b956518
4 changed files with 19 additions and 2 deletions
|
@ -6,7 +6,7 @@
|
|||
"en": "A monitoring tool for diverse IT components, including networks, servers, VMs and cloud services.",
|
||||
"fr": "Un outil pour monitorer des réseaux, des serveurs, des VMs et autres services en ligne"
|
||||
},
|
||||
"version": "3.2",
|
||||
"version": "3.2.2",
|
||||
"url": "https://www.zabbix.com",
|
||||
"license": "free",
|
||||
"maintainer": {
|
||||
|
|
|
@ -207,4 +207,14 @@ convert_ZabbixDB(){
|
|||
do
|
||||
mysql --user=$db_user --password=$db_pwd --database=$db_name -e "ALTER TABLE $t CONVERT TO character set utf8 collate utf8_bin;"
|
||||
done
|
||||
}
|
||||
}
|
||||
|
||||
#if not already modified, add email media type with the yunohost server mail.
|
||||
set_mediatype_default_yunohost(){
|
||||
set -x
|
||||
if [ $($mysqlconn -BN -e "SELECT count(*) FROM media_type WHERE smtp_server LIKE 'mail.example.com' AND status=1;") -eq 1 ] ; then
|
||||
$mysqlconn -BN -e "UPDATE media_type SET smtp_server = 'localhost', smtp_helo = '"$domain"', smtp_email = 'zabbix@"$domain"', smtp_port = '587', status=0 , smtp_security=1 WHERE smtp_server LIKE 'mail.example.com' AND status=1;"
|
||||
ynh_print_info "Default Media type added !"
|
||||
fi
|
||||
set +x
|
||||
}
|
||||
|
|
|
@ -172,6 +172,8 @@ done
|
|||
|
||||
disable_guest_user
|
||||
|
||||
set_mediatype_default_yunohost
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
|
|
|
@ -188,6 +188,11 @@ update_initZabbixConf
|
|||
#=================================================
|
||||
convert_ZabbixDB
|
||||
|
||||
#=================================================
|
||||
# Add settings for yunohost mail server
|
||||
#=================================================
|
||||
set_mediatype_default_yunohost
|
||||
|
||||
#=================================================
|
||||
# Update php-fpm confi
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue