Cleanup
This commit is contained in:
parent
9fd66ed242
commit
fc33e1c451
@ -297,7 +297,7 @@ run_swan_update() {
|
||||
if ( set -x; wget -t 3 -T 30 -q -O "$TMPDIR/vpnup.sh" "$update_url"; ); then
|
||||
(
|
||||
set -x
|
||||
/bin/sh "$TMPDIR/vpnup.sh"
|
||||
/bin/bash "$TMPDIR/vpnup.sh"
|
||||
)
|
||||
else
|
||||
echo "Error: Could not download update script." >&2
|
||||
|
@ -159,7 +159,7 @@ run_setup() {
|
||||
if [ -d "$TMPDIR" ]; then
|
||||
if ( set -x; wget -t 3 -T 30 -q -O "$TMPDIR/vpn.sh" "$setup_url" \
|
||||
|| curl -fsL "$setup_url" -o "$TMPDIR/vpn.sh" 2>/dev/null ); then
|
||||
if /bin/sh "$TMPDIR/vpn.sh"; then
|
||||
if /bin/bash "$TMPDIR/vpn.sh"; then
|
||||
if [ -s /opt/src/ikev2.sh ] && [ ! -f /etc/ipsec.d/ikev2.conf ]; then
|
||||
sleep 1
|
||||
/bin/bash /opt/src/ikev2.sh --auto || status=1
|
||||
|
@ -142,7 +142,7 @@ run_setup() {
|
||||
if [ -d "$TMPDIR" ]; then
|
||||
if ( set -x; wget -t 3 -T 30 -q -O "$TMPDIR/vpnup.sh" "$setup_url" \
|
||||
|| curl -fsL "$setup_url" -o "$TMPDIR/vpnup.sh" 2>/dev/null ); then
|
||||
VPN_UPDATE_SWAN_VER="$SWAN_VER" /bin/sh "$TMPDIR/vpnup.sh" || status=1
|
||||
VPN_UPDATE_SWAN_VER="$SWAN_VER" /bin/bash "$TMPDIR/vpnup.sh" || status=1
|
||||
else
|
||||
status=1
|
||||
echo "Error: Could not download update script." >&2
|
||||
|
@ -218,7 +218,7 @@ run_setup() {
|
||||
VPN_L2TP_LOCAL="$VPN_L2TP_LOCAL" VPN_L2TP_POOL="$VPN_L2TP_POOL" \
|
||||
VPN_XAUTH_NET="$VPN_XAUTH_NET" VPN_XAUTH_POOL="$VPN_XAUTH_POOL" \
|
||||
VPN_DNS_SRV1="$VPN_DNS_SRV1" VPN_DNS_SRV2="$VPN_DNS_SRV2" \
|
||||
/bin/sh "$TMPDIR/vpn.sh" || status=1
|
||||
/bin/bash "$TMPDIR/vpn.sh" || status=1
|
||||
else
|
||||
status=1
|
||||
echo "Error: Could not download VPN setup script." >&2
|
||||
|
Loading…
Reference in New Issue
Block a user