#!/bin/bash

[ -f /etc/eole/config.eol ] || exit 0

if [ "$(CreoleGet activer_proxy_client)" = 'oui' ]; then
    proxy_client_adresse="$(CreoleGet proxy_client_adresse)"
    proxy_client_port="$(CreoleGet proxy_client_port)"
    snap set system proxy.http="http://$proxy_client_adresse:$proxy_client_port"
    snap set system proxy.https="http://$proxy_client_adresse:$proxy_client_port"
else
    snap unset system proxy.http
    snap unset system proxy.https
fi

exit 0
