summaryrefslogtreecommitdiff
path: root/scripts/delete_status_network.sh
blob: 32187382cde25559f39e77849896c0df0f485683 (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/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
    rm -Rf $top/$nickname
done