#!/bin/sh

# Preset for ctctl: Unlink VPN's traffic for VPS and remove VPN client
# Version: 1.0.0
# Copyright: GNU GPL (2021-2021) Narcis Garcia
# Homepage: https://www.somtecnologia.com/

# TO DO:
#	- 


if [ -f "${PresetsDir}/server_lib.sh.inc" ] ; then
	. "${PresetsDir}/server_lib.sh.inc"
else
	printf '%s\n' "${sERROR}E: Presets library file not found: ${PresetsDir}/server_lib.sh${fRESET}" 1>&2
	LastStatus=95 ; if [ $StatusCode -eq 0 ] ; then StatusCode=$LastStatus ; fi
fi

preset_UNLINKVPN ()
{
}

case "$Type" in
	"ovz" )
		printf '%s\n' "${sERROR}E: Container type \"${Type}\" not yet implemented for preset: ${Preset}.${fRESET}" 1>&2
		LastStatus=63 ; if [ $StatusCode -eq 0 ] ; then StatusCode=$LastStatus ; fi
		;;
	"lxc" )
		preset_UNLINKVPN
		LastStatus=$? ; if [ $StatusCode -eq 0 ] ; then StatusCode=$LastStatus ; fi
		;;
	* )
		printf '%s\n' "${sERROR}E: Unknown or unsupported container type \"${Type}\" for preset: ${Preset}.${fRESET}" 1>&2
		LastStatus=80 ; if [ $StatusCode -eq 0 ] ; then StatusCode=$LastStatus ; fi
		;;
esac
