mediawiki: Utilize purging of packages and don't remove explicitly

- Purging mediawiki package removes /etc/mediawiki. There is no need to
explicitly remove our two configuration files from /etc/mediawiki.

Tests:

- Setup mediawiki, change public registrations setting and uninstall. Reinstall
and observe that public registrations setting is reset.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2023-06-06 09:51:20 -07:00 committed by James Valleroy
parent 414553ad93
commit dd199fbfad
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -185,5 +185,4 @@ def set_default_language(language: str):
def uninstall():
"""Remove Mediawiki's database and local config file."""
shutil.rmtree('/var/lib/mediawiki-db', ignore_errors=True)
pathlib.Path(LOCAL_SETTINGS_CONF).unlink(missing_ok=True)
pathlib.Path(CONF_FILE).unlink(missing_ok=True)
# /etc/mediawiki is removed on purge of mediawiki package