Add time syncing before launching openvpn, to avoid issues due to 'certificate not yet valid'
This commit is contained in:
parent
33aafd1196
commit
355b24ea0c
@ -129,6 +129,8 @@ start_openvpn() {
|
||||
[ "${ynh_server_proto}" == tcp ] && proto=tcp-client
|
||||
fi
|
||||
|
||||
sync_time
|
||||
|
||||
cp /etc/openvpn/client.conf{.tpl,}
|
||||
|
||||
sed "s|<TPL:SERVER_NAME>|${ynh_server_name}|g" -i /etc/openvpn/client.conf
|
||||
@ -195,6 +197,12 @@ stop_openvpn() {
|
||||
|
||||
## Tools
|
||||
|
||||
sync_time() {
|
||||
systemctl stop ntp
|
||||
ntpd -qg &> /dev/null
|
||||
systemctl start ntp
|
||||
}
|
||||
|
||||
ynh_setting_get() {
|
||||
app=${1}
|
||||
setting=${2}
|
||||
|
Loading…
x
Reference in New Issue
Block a user