mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-26 12:46:08 +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."""
|
"""Install and configure the app."""
|
||||||
super().setup(old_version)
|
super().setup(old_version)
|
||||||
privileged.setup()
|
privileged.setup()
|
||||||
self.enable()
|
if not old_version:
|
||||||
|
self.enable()
|
||||||
|
|
||||||
def uninstall(self):
|
def uninstall(self):
|
||||||
"""De-configure and uninstall the app."""
|
"""De-configure and uninstall the app."""
|
||||||
|
|||||||
@ -9,7 +9,6 @@ import shutil
|
|||||||
import subprocess
|
import subprocess
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from plinth import action_utils
|
|
||||||
from plinth.actions import privileged
|
from plinth.actions import privileged
|
||||||
|
|
||||||
DATA_DIR = '/var/lib/infinoted'
|
DATA_DIR = '/var/lib/infinoted'
|
||||||
@ -167,8 +166,6 @@ def setup():
|
|||||||
shutil.chown(KEY_DIR + '/infinoted-key.pem', user='infinoted',
|
shutil.chown(KEY_DIR + '/infinoted-key.pem', user='infinoted',
|
||||||
group='infinoted')
|
group='infinoted')
|
||||||
|
|
||||||
action_utils.service_enable('infinoted')
|
|
||||||
|
|
||||||
|
|
||||||
@privileged
|
@privileged
|
||||||
def uninstall():
|
def uninstall():
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user