-
Notifications
You must be signed in to change notification settings - Fork 2
/
admin.sh
67 lines (51 loc) · 1.36 KB
/
admin.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/sh
choice=""
while true
do
echo "========================="
echo "= ADMINISTRATOR OPTIONS ="
echo "========================="
echo "1) Run setup (full)"
echo "2) Run setup (quick)"
echo "3) Delete a post"
echo "4) Delete a thread"
echo "5) Create an open sticky"
echo "6) Create a closed sticky"
echo "7) Post to a thread"
echo "8) Wipe"
echo "q) Quit"
echo
read -p "choice: " choice
echo
case $choice in
1) echo "Running setup..."
sh setup.sh
echo "Setup complete!";;
2) echo "Running setup (quick)..."
sh setup.sh -quick
echo "Setup complete!";;
3) echo "======================="
echo "= !!! DELETE POST !!! ="
echo "======================="
read -p "post #: " post
sh deletepost.sh $post
if [ $? -eq 0 ]; then echo "Post deleted!"; fi;;
4) echo "========================="
echo "= !!! DELETE THREAD !!! ="
echo "========================="
read -p "thread #: " thread
sh deletethread.sh $thread
if [ $? -eq 0 ]; then echo "Thread deleted!"; fi;;
5) read -p "sticky title: " title
sh newsticky.sh $title;;
6) read -p "sticky title: " title
sh newrosticky.sh $title;;
7) read -p "thread #: " thread
sh post.sh $thread
if [ $? -eq 0 ]; then echo "Post successful!"; fi;;
8) sh wipe.sh;;
q) exit;;
*) echo "invalid selection";;
esac
echo
done