mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-03-11 09:04:54 +00:00
infinoted: Don't enable app when setup is rerun
Tests: - When app is freshly installed, app is enabled. - Rerun setup after disabling the app. App is not enabled. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
e6b88a48b9
commit
3172c6a7b4
@ -77,7 +77,8 @@ class InfinotedApp(app_module.App):
|
||||
"""Install and configure the app."""
|
||||
super().setup(old_version)
|
||||
privileged.setup()
|
||||
self.enable()
|
||||
if not old_version:
|
||||
self.enable()
|
||||
|
||||
def uninstall(self):
|
||||
"""De-configure and uninstall the app."""
|
||||
|
||||
@ -9,7 +9,6 @@ import shutil
|
||||
import subprocess
|
||||
import time
|
||||
|
||||
from plinth import action_utils
|
||||
from plinth.actions import privileged
|
||||
|
||||
DATA_DIR = '/var/lib/infinoted'
|
||||
@ -167,8 +166,6 @@ def setup():
|
||||
shutil.chown(KEY_DIR + '/infinoted-key.pem', user='infinoted',
|
||||
group='infinoted')
|
||||
|
||||
action_utils.service_enable('infinoted')
|
||||
|
||||
|
||||
@privileged
|
||||
def uninstall():
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user