7 Commits

Author SHA1 Message Date
agentcobra
4c00ff92ef Update README.md
add integration from jenkins
2018-10-02 23:41:31 +02:00
Sebastien Badia
8f2ba6cdcd doc: s/NextCloud/LaBriqueInterNet VPNclient/ thx agentcorba 2018-10-02 23:41:14 +02:00
Sebastien Badia
2e0fbfddff doc: Update syntax (badges) 2018-10-02 23:40:52 +02:00
Sebastien Badia
4aa7062213 doc: Added install badge 2018-10-02 23:40:18 +02:00
ljf (zamentur)
033abdcb69 [enh] Update version number 2018-10-02 23:35:39 +02:00
ljf (zamentur)
84a4e1a319 [fix] Sync the date with http if ntp can't (#37)
* [fix] Sync the date with http if ntp can't
2018-10-02 23:31:46 +02:00
agentcobra
8b3a04fb90 emergency fix
with 
- 5654b6d0b2
- 081447008c
- a642a01029
2018-09-10 21:50:47 +02:00
4 changed files with 26 additions and 4 deletions

View File

@@ -1,4 +1,6 @@
# VPN Client
# VPN Client [![Build Status](https://travis-ci.org/labriqueinternet/vpnclient_ynh.svg?branch=master)](https://travis-ci.org/labriqueinternet/vpnclient_ynh) [![Integration level](https://dash.yunohost.org/integration/vpnclient.svg)](https://ci-apps.yunohost.org/jenkins/job/vpnclient%20%28Community%29/lastBuild/consoleFull)
[![Install LaBriqueInterNet VPNclient with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=vpnclient)
## Overview
VPN Client app for [YunoHost](http://yunohost.org/).

View File

@@ -129,6 +129,10 @@ start_openvpn() {
[ "${ynh_server_proto}" == tcp ] && proto=tcp-client
fi
# Unset firewall to let DNS and NTP resolution works
# Firewall is reset after vpn is mounted (more details on #1016)
unset_firewall
sync_time
cp /etc/openvpn/client.conf{.tpl,}
@@ -199,7 +203,21 @@ stop_openvpn() {
sync_time() {
systemctl stop ntp
ntpd -qg &> /dev/null
timeout 20 ntpd -qg &> /dev/null
# Some networks drop ntp port (udp 123).
# Try to get the date with an http request on the internetcube web site
if [ $? -ne 0 ]; then
http_date=`curl -sD - labriqueinter.net | grep '^Date:' | cut -d' ' -f3-6`
http_date_seconds=`date -d "${http_date}" +%s`
curr_date_seconds=`date +%s`
# Set the new date if it's greater than the current date
# So it does if 1970 year or if old fake-hwclock date is used
if [ $http_date_seconds -ge $curr_date_seconds ]; then
date -s "${http_date}"
fi
fi
systemctl start ntp
}

View File

@@ -6,7 +6,9 @@
"fr": "Client VPN"
},
"license": "AGPL-3",
"developer": {
"url": "https://github.com/labriqueinternet/vpnclient_ynh",
"version": "1.1.1",
"maintainer": {
"name": "Julien Vaubourg",
"email": "julien@vaubourg.com",
"url": "http://julien.vaubourg.com"

View File

@@ -33,7 +33,7 @@ fi
ynh_webpath_register vpnclient $domain $url_path || exit 1
# Install packages
packages='php5-fpm sipcalc dnsutils openvpn curl'
packages='php5-fpm sipcalc dnsutils openvpn curl fake-hwclock'
export DEBIAN_FRONTEND=noninteractive
sudo apt-get --assume-yes --force-yes install ${packages}