Skip to content
This repository was archived by the owner on Jun 15, 2021. It is now read-only.

Commit cf5c1f8

Browse files
authored
Merge pull request #84 from linuxserver/init
Prevent auto start after install and init, let s6 start it
2 parents e6db58d + 87eb8fc commit cf5c1f8

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
205205

206206
## Versions
207207

208+
* **22.08.19:** - Prevent auto-start of openvpn after first time install, before configuration is completed.
208209
* **25.07.19:** - Create a xenial branch/tag and rebase master/latest to bionic.
209210
* **07.04.19:** - Fix first time config.
210211
* **03.04.19:** - Big rewrite of the install and update logic of openvpn-as to fix breaking changes (should fix updating from 2.6.1 to 2.7.3), added mysql-client for cluster support.

readme-vars.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ app_setup_block: |
6363
6464
# changelog
6565
changelogs:
66+
- { date: "22.08.19:", desc: "Prevent auto-start of openvpn after first time install, before configuration is completed." }
6667
- { date: "25.07.19:", desc: "Create a xenial branch/tag and rebase master/latest to bionic." }
6768
- { date: "07.04.19:", desc: "Fix first time config." }
6869
- { date: "03.04.19:", desc: "Big rewrite of the install and update logic of openvpn-as to fix breaking changes (should fix updating from 2.6.1 to 2.7.3), added mysql-client for cluster support." }

root/etc/cont-init.d/30-config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ if [ -f /openvpn/openvpn.deb ]; then
1616
if [ ! -f /config/etc/as.conf ]; then
1717
echo "installing openvpn-as for the first time"
1818
dpkg -i /openvpn/openvpn.deb
19+
echo "Stopping openvpn-as now; will start again later after configuring"
20+
kill `cat /var/run/openvpnas.pid`
1921
rm /openvpn/openvpn.deb
2022
sed -i \
2123
-e 's#=openvpn_as#=abc#g' \
@@ -37,6 +39,8 @@ if [ -f /openvpn/openvpn.deb ]; then
3739
cd /config || exit
3840
rm -rf !("backup"|"log")
3941
dpkg -i /openvpn/openvpn.deb
42+
echo "Stopping openvpn-as now; will start again later after configuring"
43+
kill `cat /var/run/openvpnas.pid`
4044
rm /openvpn/openvpn.deb
4145
sed -i \
4246
-e 's#=openvpn_as#=abc#g' \

root/etc/cont-init.d/40-openvpn-init

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ fi
1212
if [[ $(find /config/etc/db -type f | wc -l) -eq 0 || ! -f "/config/etc/as.conf" || (-f "/config/etc/as.conf" && $(grep "vpn.server.user=openvpn_as" /config/etc/as.conf)) ]]; then
1313
# shellcheck disable=SC2059
1414
printf "${CONFINPUT}" | /usr/local/openvpn_as/bin/ovpn-init
15+
echo "Stopping openvpn-as now; will start again later after configuring"
16+
kill `cat /var/run/openvpnas.pid`
1517
fi
1618

1719
chown -R abc:abc \

0 commit comments

Comments
 (0)