From 83b5e6be0244e8b8c971bcc11103c2e32b54efd6 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 23 Jun 2009 11:40:23 -0700 Subject: [PATCH] script to delete a status network --- scripts/delete_status_network.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 scripts/delete_status_network.sh diff --git a/scripts/delete_status_network.sh b/scripts/delete_status_network.sh new file mode 100644 index 0000000000..1cf716849e --- /dev/null +++ b/scripts/delete_status_network.sh @@ -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