mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
openvpn: Upgrade to the new Debian way
Earlier only openvpn@.service file was available. Currently, Debian is using openvpn-server@.service and openvpn-client@.service. Start using this and upgrade our current users to this approach. This fixes the problem with incorrect enabling/disabling of OpenVPN app in Plinth. Tested primarily three cases: - Install version 2 of the app directly. Make sure daemon runs, enabling/disabling the app works. - Install version 1 of the app. Disable it. Upgrade to version 2 make sure everything is upgraded but disabled. Enabling make the app work properly. - Install version 1 of the app. Enable it. Upgrade to version 2 make sure everything is upgraded, app is enabled and running. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
f11dd191c1
commit
71cc0e1fb0
2 files changed
+26
-6
No files matched your search
@@ -30,12 +30,11 @@ from plinth import service as service_module
|
||||
from plinth.menu import main_menu
|
||||
from plinth.utils import format_lazy
|
||||
|
||||
|
||||
version = 1
|
||||
version = 2
|
||||
|
||||
service = None
|
||||
|
||||
managed_services = ['openvpn@freedombox']
|
||||
managed_services = ['openvpn-server@freedombox']
|
||||
|
||||
managed_packages = ['openvpn', 'easy-rsa']
|
||||
|
||||
@@ -73,6 +72,7 @@ def init():
|
||||
def setup(helper, old_version=None):
|
||||
"""Install and configure the module."""
|
||||
helper.install(managed_packages)
|
||||
helper.call('post', actions.superuser_run, 'openvpn', ['upgrade'])
|
||||
global service
|
||||
if service is None:
|
||||
service = service_module.Service(
|
||||
|
||||
Reference in new issue
Block a user