gnu-social/scripts/delete_status_network.sh

26 lines
455 B
Bash
Raw Normal View History

2009-06-24 03:40:23 +09:00
#!/bin/bash
2010-01-30 05:33:35 +09:00
# live fast! die young!
set -e
source /etc/statusnet/setup.cfg
2009-06-24 03:40:23 +09:00
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
2009-06-24 03:43:20 +09:00
rm -Rf $top/$nickname
2009-06-24 03:40:23 +09:00
done