diff --git a/.DEBIAN/postrm b/.DEBIAN/postrm index 63ca44f..6b9d3f4 100755 --- a/.DEBIAN/postrm +++ b/.DEBIAN/postrm @@ -1,11 +1,11 @@ #!/bin/bash -if [ -f /etc/systemd/system/fastapi-dls.service ]; then +if [ "$1" = purge ] && [ -f /etc/systemd/system/fastapi-dls.service ]; then echo "> Removing service file." rm /etc/systemd/system/fastapi-dls.service fi -if [ -d /usr/share/fastapi-dls ]; then +if [ "$1" = purge ] && [ -d /usr/share/fastapi-dls ]; then echo "> Removing app." rm -r /usr/share/fastapi-dls fi