1
0
Fork 0
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:
Mickael-Martin 2019-01-17 13:04:44 +01:00
parent c9b412c141
commit 530e986fdc

View file

@ -117,18 +117,16 @@ curl -s --cookie cookiejar.txt --cookie-jar cookiejar.txt \
haveDefaultAdminDisabled=$(mysql -BN -u$db_user -p$db_pwd $db_name -BN -e "SELECT count(id) from \`users_groups\` where userid=1 and usrgrpid=9")
if [ "$haveDefaultAdminDisabled" -eq 0 ] ;then
echo "Disable default admin"
ynh_print_info "Disable default admin"
#disable default admin
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, 1);"
else
echo "default admin already disabled"
ynh_print_info "default admin already disabled"
fi
#=================================================
# CHECK THE PATH
#=================================================