From 07d76e23bfb0d2000192f8fd99985e23a3cfe4b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=AE=E7=94=9F=E8=8B=A5=E6=A2=A6?= <1070753498@qq.com> Date: Wed, 13 Dec 2023 19:59:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20ubuntu=E6=89=93=E5=8C=85?= =?UTF-8?q?=E8=84=9A=E6=9C=AC=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packaging/ubuntu/DEBIAN/control | 2 +- packaging/ubuntu/DEBIAN/postrm | 4 ++++ packaging/ubuntu/DEBIAN/preinst | 4 +--- packaging/ubuntu/DEBIAN/prerm | 6 ++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packaging/ubuntu/DEBIAN/control b/packaging/ubuntu/DEBIAN/control index c17ade2..f8e8757 100644 --- a/packaging/ubuntu/DEBIAN/control +++ b/packaging/ubuntu/DEBIAN/control @@ -1,5 +1,5 @@ Package: myapp -Version: 1.2.9 +Version: 0.0.1 Architecture: amd64 Description: myapp Maintainer: 1070753498@qq.com diff --git a/packaging/ubuntu/DEBIAN/postrm b/packaging/ubuntu/DEBIAN/postrm index 2c56b70..961005d 100644 --- a/packaging/ubuntu/DEBIAN/postrm +++ b/packaging/ubuntu/DEBIAN/postrm @@ -2,4 +2,8 @@ rm -f /usr/share/applications/MyApp.desktop +if ["$1" = "purge"]; then + rm -rf ~/.config/MyApp +fi + exit 0 diff --git a/packaging/ubuntu/DEBIAN/preinst b/packaging/ubuntu/DEBIAN/preinst index 6422644..a06fd1d 100644 --- a/packaging/ubuntu/DEBIAN/preinst +++ b/packaging/ubuntu/DEBIAN/preinst @@ -1,7 +1,5 @@ #!/bin/sh -if [ -f "/opt/MyApp/MyApp" ]; then - killall MyApp -fi +killall -q MyApp exit 0 diff --git a/packaging/ubuntu/DEBIAN/prerm b/packaging/ubuntu/DEBIAN/prerm index ed9847b..b04482b 100644 --- a/packaging/ubuntu/DEBIAN/prerm +++ b/packaging/ubuntu/DEBIAN/prerm @@ -1,9 +1,7 @@ #!/bin/sh -if [ -f "/opt/MyApp/MyApp" ]; then - killall MyApp -fi +killall -q MyApp + rm -f /usr/share/applications/MyApp.desktop -rm -rf ~/.config/MyApp exit 0