-
Notifications
You must be signed in to change notification settings - Fork 1
/
run_replit.sh
26 lines (20 loc) · 1.06 KB
/
run_replit.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
echo " .__ __
______ ____ ___ _____ _________|__|/ |_ ___.__.
/ ___// __ \\ \/ / | \_ __ \ \ __< | |
\___ \\ ___/ > <| | /| | \/ || | \___ |
/____ >\___ >__/\_ \____/ |__| |__||__| / ____|
\/ \/ \/ \/ "
echo "Starting Redis server in the background..."
redis-server --save 60 1 --dbfilename dump.rdb --daemonize yes
if [ ! -f "config.yaml" ]; then
echo "Error: Could not fine config.yaml file. Make sure you rename config.example.yaml to config.yaml and fill in the values."
exit 1
fi
if [ ! -d "target/release/sexurity-poller" ]; then
echo "Building project..."
cargo build --release
fi
sed -i -e 's/redis:6379/localhost:6379/g' config.yaml # Replace redis://redis:6379 to redis://localhost:6379 in config file
echo "Starting sexurity..."
RUST_LOG=info APP_NAME=./target/release/sexurity-poller CONFIG_NAME=poller bash yaml_to_cli.sh config.yaml &
RUST_LOG=info APP_NAME=./target/release/sexurity-discord CONFIG_NAME=discord bash yaml_to_cli.sh config.yaml