#!/bin/bash
. /usr/lib/eole/ihm.sh
UPSTART_STRONGSWAN="strongswan"

install_rvp=$(CreoleGet install_rvp)
type_amon=$(CreoleGet type_amon '')
if [ "$install_rvp" = "non" ]
then
    # ipsec est inutile (#1937)
    service $UPSTART_STRONGSWAN stop &>/dev/null
elif [ "${type_amon}" != "" ]
then
    if [ "$1" = "instance" ]
    then
        ## Mise en place du VPN ##
        echo
        Question_ouinon "Voulez-vous (re)configurer le Réseau Virtuel Privé maintenant ?" "True" "non" "warn"
        if [ $? -eq 0 ];then
            /usr/share/eole/sbin/active_rvp init
        fi
        echo
    fi
fi

exit 0
