Skip to content

Commit 55726fc

Browse files
committed
Changes from Devel-Server to master
2 parents fdad476 + 726d5ea commit 55726fc

File tree

5 files changed

+47
-13
lines changed

5 files changed

+47
-13
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# OpenVPN-WebAdmin Version History
22

3+
## 1.4.2
4+
5+
Sorry, only new installation. The version with the updates from 1.4.0 to currently 1.4.2 will only be available with 1.5.0.
6+
7+
- Display OpenVPN-Server Version in the overview
8+
- The OpenVPN server is now installed directly by the maintainer Openvpn. The update cycles of the respective distributions simply take too long. Security comes first.
9+
- Update nodejs 10 auf 12
10+
- added Spanish lang (es_ES) in web frontend/installation (Many thanks to @victorhck)
11+
- Changes in the installation procedure
12+
313
## 1.4.1
414

515
- Installation script completely rebuilt

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# OpenVPN WebAdmin 1.4.1
1+
# OpenVPN WebAdmin 1.4.2
22

33
You lock your front door. But why do you leave the back entrances open? This is the same with almost all Internet accesses to your IoT, webcams and other devices.
44

@@ -77,6 +77,7 @@ Without deactivated firewall the installation will not be completed. Only those
7777
* curl
7878
* git
7979
* net-tools (for the includes simple firewall)
80+
* gnupg
8081

8182
## Note MySQL
8283

@@ -86,7 +87,7 @@ For a local installation of a MySQL server, you will automatically be asked to e
8687

8788
## Tested on
8889

89-
* Debian 10/Buster, PHP 7.2.x, 10.3.22-MariaDB.
90+
* Debian 10/Buster, PHP 7.3.x, 10.3.22-MariaDB.
9091
* RaspberryPi 4 with Debian Buster
9192
* CentOS 8
9293

install.sh

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# @copyright 2020 OpenVPN-WebAdmin
1515
# @link https://github.com/Wutze/OpenVPN-WebAdmin
1616
# @see Internal Documentation ~/doc/
17-
# @version 1.4.1
17+
# @version 1.4.2
1818
# @todo new issues report here please https://github.com/Wutze/OpenVPN-WebAdmin/issues
1919

2020

@@ -285,13 +285,32 @@ check_config(){
285285
message_print_out 1 "read install-config"
286286
}
287287

288+
#
289+
# Security updates come in too late from the distributions.
290+
# Therefore, the openvpn repo will be used from now on.
291+
# @callfrom function collect_param_install_programs
292+
#
293+
set_openvpn_repo(){
294+
message_print_out i "set openvpn repo"
295+
if [ "${OS}" == "debian" ]; then
296+
apt-get update && apt-get -y install ca-certificates wget net-tools gnupg >> ${CURRENT_PATH}/loginstall.log
297+
wget -O - https://swupdate.openvpn.net/repos/repo-public.gpg | apt-key add -
298+
echo "deb http://build.openvpn.net/debian/openvpn/stable/ ${CODENAME} main" > /etc/apt/sources.list.d/openvpn-as-repo.list
299+
apt-get update >> ${CURRENT_PATH}/loginstall.log
300+
elif [ "${OS}" == "centos" ]; then
301+
yum copr enable dsommers/openvpn-git >> ${CURRENT_PATH}/loginstall.log
302+
fi
303+
message_print_out 1 "set openvpn repo ${OS}"
304+
}
305+
288306
#
289307
# you need this programs
290308
# Here it is defined which operating system needs which programs
291309
# @callfrom function do_select_start_install
292310
# @pos017
293311
#
294312
collect_param_install_programs(){
313+
set_openvpn_repo
295314
message_print_out i "collect install programms"
296315
if [ "${OS}" == "debian" ]; then
297316
autoinstall="openvpn php-mysql php-zip php unzip git wget sed curl git net-tools nodejs"

installation/functions.sh

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -187,16 +187,15 @@ check_user(){
187187
# @pos012
188188
#
189189
set_os_version(){
190-
if [[ -e /etc/debian_version ]]; then
191-
OS="debian"
192-
OSVERSION=$(grep -oE '[0-9]+' /etc/debian_version | head -1)
193-
message_print_out i "Install on: ${OS} ${OSVERSION}"
190+
if [[ -e /etc/os-release ]]; then
191+
OS=$(grep "\bID\b" /etc/os-release | cut -d '=' -f2 | tr -d '"')
192+
OSVERSION=$(grep "\bVERSION_ID\b" /etc/os-release | cut -d '=' -f2 | tr -d '"')
193+
CODENAME=$(grep "\bVERSION_CODENAME\b" /etc/os-release | cut -d '=' -f2 | tr -d '"')
194+
message_print_out i "Install on: ${OS} ${CODENAME}"
194195
# Fix Debian 10 Fehler
195-
export PATH=$PATH:/usr/sbin:/sbin
196-
elif [[ -e /etc/centos-release ]]; then
197-
OS="centos"
198-
OSVERSION=$(grep -oE '[0-9]+' /etc/centos-release | head -1)
199-
message_print_out i "Install on: ${OS} ${OSVERSION}"
196+
if [ ${OS} = 'debian' ]; then
197+
export PATH=$PATH:/usr/sbin:/sbin
198+
fi
200199
else
201200
message_print_out 0 "No suitable operating system found, sorry"
202201
message_print_out 0 ${BREAK}

wwwroot/include/html/modules/admin/admin-sysoverview.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* @copyright 2020 OpenVPN-WebAdmin
1616
* @link https://github.com/Wutze/OpenVPN-WebAdmin
1717
* @see Internal Documentation ~/doc/
18-
* @version 1.2.0
18+
* @version 1.4.2
1919
* @todo new issues report here please https://github.com/Wutze/OpenVPN-WebAdmin/issues
2020
*/
2121

@@ -34,6 +34,8 @@
3434
preg_match_all('/^(NAME=|VERSION=)"([0-9a-zA-Z\/\.\s\(\)]*)"/m', shell_exec("cat /etc/os-release"), $matches, PREG_SET_ORDER, 0);
3535
$stat['osversion'] = $matches[1][2];
3636
$stat['osname'] = $matches[0][2];
37+
preg_match_all('/^OpenVPN[0-9\.\s\_\-a-z]*/m', shell_exec("openvpn --version"), $matches, PREG_SET_ORDER, 0);
38+
$stat['ovpnversion'] = $matches[0][0];
3739

3840
if(file_exists(REAL_BASE_DIR.'/dev/dev.version.php') and defined('preview')){
3941
include_once(REAL_BASE_DIR.'/dev/dev.version.php');
@@ -116,6 +118,9 @@
116118
<li class="list-group-item">
117119
<b>Version:</b> <a class="float-right"><?php echo $stat['osversion']; ?></a>
118120
</li>
121+
<li class="list-group-item">
122+
<b>OpenVPN Version:</b> <a class="float-right"><?php echo $stat['ovpnversion']; ?></a>
123+
</li>
119124
<li class="list-group-item">
120125
<b>PHP:</b> <a class="float-right"><?php echo phpversion(); ?></a>
121126
</li>

0 commit comments

Comments
 (0)