]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
script to delete a status network
authorEvan Prodromou <evan@controlyourself.ca>
Tue, 23 Jun 2009 18:40:23 +0000 (11:40 -0700)
committerEvan Prodromou <evan@controlyourself.ca>
Tue, 23 Jun 2009 18:40:23 +0000 (11:40 -0700)
scripts/delete_status_network.sh [new file with mode: 0644]

diff --git a/scripts/delete_status_network.sh b/scripts/delete_status_network.sh
new file mode 100644 (file)
index 0000000..1cf7168
--- /dev/null
@@ -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