29 lines
1.3 KiB
Shell
Executable file
29 lines
1.3 KiB
Shell
Executable file
#!/bin/sh
|
|
# SPDX-License-Identifier: LGPL-3.0-only
|
|
# SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®
|
|
#
|
|
# Removes what install.sh installed. Run as root. Every user's bank connections stay in /var/lib/nostro, for a later
|
|
# install to find, unless --purge is given: then they go too, with the user nostro. Revoke the API keys in the bank's app
|
|
# as well, since the bank still accepts them.
|
|
set -u
|
|
|
|
systemctl stop nostrod.service 2>/dev/null
|
|
flatpak uninstall --system -y --noninteractive net.catcrafts.Nostro 2>/dev/null
|
|
flatpak remote-delete --system nostro-local 2>/dev/null
|
|
rm -f /usr/share/dbus-1/system.d/net.catcrafts.Nostro1.conf \
|
|
/usr/share/dbus-1/system-services/net.catcrafts.Nostro1.service \
|
|
/usr/share/dbus-1/system-services/net.catcrafts.Nostro1.Checkout.service \
|
|
/usr/share/polkit-1/actions/net.catcrafts.Nostro1.policy \
|
|
/etc/systemd/system/nostrod.service \
|
|
/usr/local/bin/nostro
|
|
systemctl daemon-reload
|
|
busctl call org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus ReloadConfig
|
|
|
|
if [ "${1:-}" = --purge ]; then
|
|
rm -rf /var/lib/nostro
|
|
rm -f /usr/lib/sysusers.d/nostro.conf
|
|
userdel nostro 2>/dev/null
|
|
echo "nostro is removed, with every user's bank connections"
|
|
else
|
|
echo "nostro is removed; the bank connections stay in /var/lib/nostro (uninstall.sh --purge removes them)"
|
|
fi
|