forked from GNUsocial/gnu-social
script to delete a status network
This commit is contained in:
parent
ec4192edcd
commit
83b5e6be02
21
scripts/delete_status_network.sh
Normal file
21
scripts/delete_status_network.sh
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source /etc/laconica/setup.cfg
|
||||||
|
|
||||||
|
export nickname=$1
|
||||||
|
|
||||||
|
export database=$nickname$DBBASE
|
||||||
|
|
||||||
|
# Create the db
|
||||||
|
|
||||||
|
mysqladmin -h $DBHOST -u $ADMIN --password=$ADMINPASS -f drop $database
|
||||||
|
|
||||||
|
mysql -h $DBHOST -u $ADMIN --password=$ADMINPASS $SITEDB << ENDOFCOMMANDS
|
||||||
|
|
||||||
|
delete from status_network where nickname = '$nickname';
|
||||||
|
|
||||||
|
ENDOFCOMMANDS
|
||||||
|
|
||||||
|
for top in $AVATARBASE $FILEBASE $BACKGROUNDBASE; do
|
||||||
|
rmdir $top/$nickname
|
||||||
|
done
|
Loading…
Reference in New Issue
Block a user