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