-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun.sh
More file actions
35 lines (30 loc) · 750 Bytes
/
Copy pathrun.sh
File metadata and controls
35 lines (30 loc) · 750 Bytes
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
#!/bin/bash
echo "Starting VPN Server..."
echo
# Check if Elixir is installed
if ! command -v elixir &> /dev/null; then
echo "Error: Elixir is not installed"
echo "Please install Elixir from https://elixir-lang.org/install.html"
exit 1
fi
# Check if dependencies are installed
echo "Checking dependencies..."
mix deps.get
if [ $? -ne 0 ]; then
echo "Error: Failed to get dependencies"
exit 1
fi
# Compile the project
echo "Compiling project..."
mix compile
if [ $? -ne 0 ]; then
echo "Error: Failed to compile project"
exit 1
fi
# Start the VPN server
echo
echo "VPN Server is starting..."
echo "Press Ctrl+C to stop the server"
echo
# Use exec to replace the shell with the VPN server process
exec mix run --no-halt