-
Notifications
You must be signed in to change notification settings - Fork 11
/
run.sh
executable file
·46 lines (33 loc) · 981 Bytes
/
run.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
#!/bin/bash
# ugly but readable lel
# if variable is not empty
if ! [ -z "$certFile" ]; then
certFile="-certFile $certFile"
fi
if ! [ -z "$db" ]; then
db="-db $db"
fi
if ! [ -z "$https" ]; then
https="-https"
fi
if ! [ -z "$keyFile" ]; then
keyFile="-keyFile $keyFile"
fi
if ! [ -z "$listenip" ]; then
listenip="-listenip $listenip"
fi
if ! [ -z "$listenport" ]; then
listenport="-listenport $listenport"
fi
if ! [ -z "$reverseProxy" ]; then
reverseProxy="-reverseProxy"
fi
if ! [ -z "$reverseProxyPort" ]; then
reverseProxyPort="-reverseProxyPort $reverseProxyPort"
fi
if ! [ -z "$sshport" ]; then
sshport="-sshport $sshport"
fi
hostname="-hostname $(hostname -f)"
echo "using following settings:" $hostname $certFile $db $https $keyFile $listenip $listenport $reverseProxy $reverseProxyPort $sshport
/app/c2_community-linux-64 $hostname $certFile $db $https $keyFile $listenip $listenport $reverseProxy $reverseProxyPort $sshport