mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-04-29 10:10:19 +00:00
samba: Remove additional configuration files on uninstall
Tests: - Uninstall samba. Notice that /etc/default/samba and /etc/samba/smb-freedombox.conf are removed. - Reinstall samba and notice that the two files are restored to their expected content. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
b47ea8346b
commit
414553ad93
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
import configparser
|
import configparser
|
||||||
import os
|
import os
|
||||||
|
import pathlib
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
@ -312,3 +313,6 @@ def restore_shares():
|
|||||||
def uninstall():
|
def uninstall():
|
||||||
"""Drop all Samba shares."""
|
"""Drop all Samba shares."""
|
||||||
_conf_command(['drop'])
|
_conf_command(['drop'])
|
||||||
|
for path in [CONF_PATH, DEFAULT_FILE]:
|
||||||
|
# Both files are typically created on setup()
|
||||||
|
pathlib.Path(path).unlink(missing_ok=True)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user