Delete /opt/opendaylight on opendaylight package purge 52/41852/8
authorAkshita Jha <zenith158@gmail.com>
Thu, 14 Jul 2016 19:07:13 +0000 (00:37 +0530)
committerDaniel Farrell <dfarrell@redhat.com>
Wed, 27 Jul 2016 13:22:57 +0000 (13:22 +0000)
This patch adds a postrm script which deletes /opt/opendaylight/
on purge. This deletes user data and configuration. This patch
also corrects README.Debian, using the systemd unit to start OpenDaylight.

Change-Id: I558d9735d7904a5036f8538526b93a772a74b22d
Signed-off-by: Akshita Jha <zenith158@gmail.com>
deb/opendaylight/debian/README.Debian
deb/opendaylight/debian/opendaylight.postrm [new file with mode: 0644]

index 5e95f20bf2965662c7a7b2208a4c34f3d48324b9..f26e20e53455e3773994c5af963770a7a64d4195 100644 (file)
@@ -1,7 +1,9 @@
 
-To run the installed karaf container, use:
+To start OpenDaylight via systemd, use:
+  $sudo systemctl start opendaylight
 
-       $ sudo karaf
-               or
-       $ sudo /opt/opendaylight/bin/karaf
+To uninstall OpenDaylight, use:
+  $sudo apt-get remove opendaylight
 
+To uninstall OpenDaylight, while deleting user data and configuration, use:
+  $sudo apt-get purge opendaylight
diff --git a/deb/opendaylight/debian/opendaylight.postrm b/deb/opendaylight/debian/opendaylight.postrm
new file mode 100644 (file)
index 0000000..6bb974b
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh
+set -e
+
+case "$1" in
+  purge)
+    rm -rf /opt/opendaylight/
+  ;;
+  remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+  ;;
+  *)
+    echo "postrm called with unknown argument \`\$1'" >&2
+    exit 1
+  ;;
+esac
+
+#DEBHELPER#
+
+exit 0