diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/delete_status_network.sh | 21 |
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 |