mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-03-11 09:04:54 +00:00
samba: Completely uninstall app
Drop all Samba shares when app is uninstalled Test: 1. Install app, enable Open Share and Group Share 2. Reinstall app and confirm all shares get dropped Signed-off-by: nbenedek <contact@nbenedek.me> [sunil: Update docstrings] Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
4d7651c89f
commit
f52bfab993
@ -102,6 +102,11 @@ class SambaApp(app_module.App):
|
||||
if not old_version:
|
||||
self.enable()
|
||||
|
||||
def uninstall(self):
|
||||
"""De-configure and uninstall the app."""
|
||||
super().uninstall()
|
||||
privileged.uninstall()
|
||||
|
||||
|
||||
class SambaBackupRestore(BackupRestore):
|
||||
"""Component to backup/restore Samba."""
|
||||
|
||||
@ -306,3 +306,9 @@ def restore_shares():
|
||||
'Backup file {0} does not exist.'.format(SHARES_CONF_BACKUP_FILE))
|
||||
_conf_command(['drop'])
|
||||
_conf_command(['import', SHARES_CONF_BACKUP_FILE])
|
||||
|
||||
|
||||
@privileged
|
||||
def uninstall():
|
||||
"""Drop all Samba shares."""
|
||||
_conf_command(['drop'])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user