mirror of
https://github.com/YunoHost-Apps/zabbix_ynh.git
synced 2024-09-03 20:36:14 +02:00
Update upgrade
This commit is contained in:
parent
9587c5c59c
commit
9af92b1050
1 changed files with 9 additions and 2 deletions
|
@ -80,7 +80,7 @@ sid=$(curl -s --cookie cookiejar.txt --cookie-jar cookiejar.txt \
|
||||||
"$zabbixFullpath/conf.import.php?rules_preset=template" \
|
"$zabbixFullpath/conf.import.php?rules_preset=template" \
|
||||||
| grep -Po 'name="sid" value="\K([a-z0-9]{16})(?=")' )
|
| grep -Po 'name="sid" value="\K([a-z0-9]{16})(?=")' )
|
||||||
|
|
||||||
curl -s --cookie cookiejar.txt --cookie-jar cookiejar.txt \
|
importState=$(curl -s --cookie cookiejar.txt --cookie-jar cookiejar.txt \
|
||||||
--form "config=1" \
|
--form "config=1" \
|
||||||
--form "import_file=@$localpath" \
|
--form "import_file=@$localpath" \
|
||||||
--form rules[groups][createMissing]=1 \
|
--form rules[groups][createMissing]=1 \
|
||||||
|
@ -105,7 +105,14 @@ curl -s --cookie cookiejar.txt --cookie-jar cookiejar.txt \
|
||||||
--form "backurl=templates.php" \
|
--form "backurl=templates.php" \
|
||||||
--form "form_refresh=1" \
|
--form "form_refresh=1" \
|
||||||
--form "sid=${sid}" \ \
|
--form "sid=${sid}" \ \
|
||||||
"${zabbixFullpath}/conf.import.php?rules_preset=template"
|
"${zabbixFullpath}/conf.import.php?rules_preset=template" \
|
||||||
|
| grep -c "Imported successfully")
|
||||||
|
|
||||||
|
if [ "$importState" -eq "1" ];then
|
||||||
|
ynh_print_info "Template Yunohost imported !"
|
||||||
|
else
|
||||||
|
ynh_print_warn "Template Yunohost imported !"
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# Disable default admin for security issue
|
# Disable default admin for security issue
|
||||||
|
|
Loading…
Add table
Reference in a new issue