-
Notifications
You must be signed in to change notification settings - Fork 1
/
welcome_script.sh
50 lines (39 loc) · 1.67 KB
/
welcome_script.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
#!/bin/bash
# Display ASCII art
cat << "EOF"
WELCOME TO SUS DB
_ _____________ _______ ____ ____ __ ______
/ | / / ____/ ___// ____/ |/_/ / / / / / / ____/
/ |/ / __/ \__ \/ / > < / / / / / / /
/ /| / /___ ___/ / /____/ / / /_/ /_/ / / /___
/_/ |_/_____//____/\____/_/ /_/\____/_/ \____/
Author: Michael Appiah Dankwah
GitHub: @Terre8055
EOF
# Display large ASCII art
cat << "EOF"
__ __ __ ______ ______ ______ ______ ______ ______ ______ ______ __ __ ______ _____ ______
/\ \ / / /\ \ /\ ___\ /\ ___\ /\ ___\ /\ __ \ /\ ___\ /\__ _\ /\ __ \ /\ ___\ /\ \/\ \ /\ ___\ /\ __-. /\ == \
\ \ \'/ \ \ \\ \ __\ \ \ \____\ \ \____\ \ \/\ \\ \___ \ \/_/\ \/ \ \ \/\ \ \ \___ \\ \ \_\ \\ \___ \\ \ \/\ \\ \ __<
\ \__| \ \_\\ \_____\\ \_____\\ \_____\\ \_____\\/\_____\ \ \_\ \ \_____\ \/\_____\\ \_____\\/\_____\\ \____- \ \_\ \_\
\/_/ \/_/ \/_____/ \/_____/ \/_____/ \/_____/ \/_____/ \/_/ \/_____/ \/_____/ \/_____/ \/_____/ \/____/ \/_/ /_/
EOF
# Start the Flask server
echo "Starting SusDB server..."
python3 src/main.py &
# Wait for the server to start
sleep 2
# Display server information
cat << EOF
SusDB server is now running on http://host-ip:8000
Available endpoints:
POST /store - Store a user string
POST /verify - Verify user credentials
POST /view - View user database
POST /retrieve - Retrieve user data
POST /close - Close user account
Use the SusDB CLI or send HTTP requests to interact with the database.
Type 'python /app/src/susdb_cli.py --help' for CLI usage information.
EOF
# Keep the container running
tail -f /dev/null