mirror of
https://github.com/YunoHost-Apps/freshrss_ynh.git
synced 2024-09-03 18:36:33 +02:00
19 lines
No EOL
411 B
Bash
Executable file
19 lines
No EOL
411 B
Bash
Executable file
#!/bin/bash
|
|
|
|
app=$1
|
|
deleted_users=$2
|
|
|
|
|
|
if [[ "freshrss" = "$app" ]];
|
|
then
|
|
db_user=freshrss
|
|
db_name=freshrss
|
|
db_pwd=$(sudo yunohost app setting freshrss mysqlpwd)
|
|
|
|
#for each deleted users
|
|
for myuser in $(echo "$deleted_users" | sed "s/,/ /g")
|
|
do
|
|
#drop all 3 tables
|
|
mysql -u root -p$root_pwd -e "DROP TABLE $myuser\_entry; DROP TABLE $myuser\_feed; DROP TABLE $myuser\_catefory;" $db_name
|
|
done
|
|
fi |