mirror of
https://github.com/YunoHost-Apps/zabbix_ynh.git
synced 2024-09-03 20:36:14 +02:00
Add new file post_user_delete
This commit is contained in:
parent
486d286bea
commit
552ada1dda
1 changed files with 11 additions and 0 deletions
11
hooks/post_user_delete
Normal file
11
hooks/post_user_delete
Normal file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
user=$1
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
db_name=$(ynh_app_setting_get $app db_name)
|
||||
db_user=$(ynh_app_setting_get $app db_user)
|
||||
db_pwd=$(ynh_app_setting_get $app mysqlpwd)
|
||||
|
||||
mysql -u$db_user -p$db_pwd $db_name -e "DELETE FROM users WHERE alias=\"$1\";"
|
Loading…
Add table
Reference in a new issue