summaryrefslogtreecommitdiff
path: root/scripts/delete_status_network.sh
blob: f55f1486bbbf7d902db8465e4ab2cdc2116f2cc3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash

source /etc/statusnet/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
    rm -Rf $top/$nickname
done