summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-06-23 11:40:23 -0700
committerEvan Prodromou <evan@controlyourself.ca>2009-06-23 11:40:23 -0700
commit83b5e6be0244e8b8c971bcc11103c2e32b54efd6 (patch)
treec2c53f864c4ca61e107359e5153c18bb097bcf8a
parentec4192edcd72e0bd0f2330a8d69b0d138a37f1f4 (diff)
script to delete a status network
-rw-r--r--scripts/delete_status_network.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/delete_status_network.sh b/scripts/delete_status_network.sh
new file mode 100644
index 000000000..1cf716849
--- /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