save_vpn changes
This commit is contained in:
@@ -1107,6 +1107,9 @@ execute_task() {
|
|||||||
|
|
||||||
elif [ "$TASK_NAME" == "save_vpn" ]; then
|
elif [ "$TASK_NAME" == "save_vpn" ]; then
|
||||||
|
|
||||||
|
JSON_TARGET=$(echo '{ "DATE": "'$DATE'", "STATUS": "0", "RESULT": "" }' | jq -r . | base64 -w0)
|
||||||
|
add_json_target
|
||||||
|
|
||||||
VPN_PROXY_REPO="wireguard-proxy-client"
|
VPN_PROXY_REPO="wireguard-proxy-client"
|
||||||
if [ ! -d "/tmp/$VPN_PROXY_REPO" ]; then
|
if [ ! -d "/tmp/$VPN_PROXY_REPO" ]; then
|
||||||
git clone https://git.format.hu/safebox/$VPN_PROXY_REPO.git /tmp/$VPN_PROXY_REPO >/dev/null
|
git clone https://git.format.hu/safebox/$VPN_PROXY_REPO.git /tmp/$VPN_PROXY_REPO >/dev/null
|
||||||
@@ -1124,7 +1127,7 @@ execute_task() {
|
|||||||
# install vpn only
|
# install vpn only
|
||||||
sh /scripts/install.sh "$B64_JSON" "$service_exec" "vpn" "$GLOBAL_VERSION"
|
sh /scripts/install.sh "$B64_JSON" "$service_exec" "vpn" "$GLOBAL_VERSION"
|
||||||
|
|
||||||
JSON_TARGET=$(echo '{ "DATE": "'$DATE'", "STATUS": "'$VPN_STATUS'", "RESULT": "'$VPN_RESULT'" }' | jq -r . | base64 -w0)
|
JSON_TARGET=$(echo '{ "DATE": "'$DATE'", "STATUS": "1", "RESULT": "'$VPN_RESULT'" }' | jq -r . | base64 -w0)
|
||||||
|
|
||||||
elif [ "$TASK_NAME" == "containers" ]; then # not in use
|
elif [ "$TASK_NAME" == "containers" ]; then # not in use
|
||||||
CONTAINERS=$(docker ps -a --format '{{.Names}} {{.Status}}' | grep -v framework-scheduler)
|
CONTAINERS=$(docker ps -a --format '{{.Names}} {{.Status}}' | grep -v framework-scheduler)
|
||||||
|
@@ -200,14 +200,18 @@ elif [ "$FIRST_INSTALL" == "vpn" ]; then
|
|||||||
|
|
||||||
get_vpn_key
|
get_vpn_key
|
||||||
|
|
||||||
edit_user_json $LETSENCRYPT_MAIL $LETSENCRYPT_SERVERNAME
|
if [ "$VPN_PROXY" != "no" ]; then
|
||||||
|
|
||||||
$SERVICE_EXEC vpn-proxy stop force
|
edit_user_json $LETSENCRYPT_MAIL $LETSENCRYPT_SERVERNAME
|
||||||
$SERVICE_EXEC vpn-proxy start
|
|
||||||
echo "$INIT_SERVICE_PATH/vpn-proxy.json" >>$AUTO_START_SERVICES/.init_services
|
$SERVICE_EXEC vpn-proxy stop force
|
||||||
echo "$INIT_SERVICE_PATH/firewall-vpn-smarthost-loadbalancer" >>$AUTO_START_SERVICES/.init_services
|
$SERVICE_EXEC vpn-proxy start
|
||||||
echo "$INIT_SERVICE_PATH/firewall-vpn-proxy-postrouting" >>$AUTO_START_SERVICES/.init_services
|
echo "$INIT_SERVICE_PATH/vpn-proxy.json" >>$AUTO_START_SERVICES/.init_services
|
||||||
echo "$INIT_SERVICE_PATH/firewall-vpn-proxy-prerouting" >>$AUTO_START_SERVICES/.init_services
|
echo "$INIT_SERVICE_PATH/firewall-vpn-smarthost-loadbalancer" >>$AUTO_START_SERVICES/.init_services
|
||||||
|
echo "$INIT_SERVICE_PATH/firewall-vpn-proxy-postrouting" >>$AUTO_START_SERVICES/.init_services
|
||||||
|
echo "$INIT_SERVICE_PATH/firewall-vpn-proxy-prerouting" >>$AUTO_START_SERVICES/.init_services
|
||||||
|
|
||||||
|
fi;
|
||||||
|
|
||||||
exit
|
exit
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user