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
c9b412c141
commit
530e986fdc
1 changed files with 2 additions and 4 deletions
|
@ -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
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue