summaryrefslogtreecommitdiff
path: root/debian/preinst
diff options
context:
space:
mode:
Diffstat (limited to 'debian/preinst')
-rw-r--r--debian/preinst16
1 files changed, 16 insertions, 0 deletions
diff --git a/debian/preinst b/debian/preinst
new file mode 100644
index 0000000..a9573de
--- /dev/null
+++ b/debian/preinst
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+set -e
+
+# If upgrading from package version
+# with unmanaged upstart configuration
+# and agent stop the agent and remove
+# the upstart configuration.
+if [ -f /etc/init/waagent.conf ]; then
+ stop waagent 2>&1 > /dev/null || true
+ rm -f /etc/init/waagent.conf
+fi
+
+#DEBHELPER#
+
+exit 0