script to delete a status network

This commit is contained in:
Evan Prodromou 2009-06-23 11:40:23 -07:00
parent ec4192edcd
commit 83b5e6be02

View 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