summaryrefslogtreecommitdiff
path: root/debian/postinst
diff options
context:
space:
mode:
Diffstat (limited to 'debian/postinst')
-rw-r--r--debian/postinst45
1 files changed, 45 insertions, 0 deletions
diff --git a/debian/postinst b/debian/postinst
new file mode 100644
index 0000000..711fa30
--- /dev/null
+++ b/debian/postinst
@@ -0,0 +1,45 @@
+#!/bin/sh
+
+echo ""
+echo ""
+echo "*********************************************************************************"
+echo " post install script run..."
+echo "*********************************************************************************"
+echo "executing oma agent unit test binary."
+
+OMA_TEST_BIN="/usr/bin/oma-test"
+if [ ! -e "$OMA_TEST_BIN" ]
+then
+ echo " oma-agent test binary missing. (check debian package is in release mode)"
+else
+
+ echo ""
+ echo ""
+ echo "*********************************************************************************"
+ echo " oma agent unit test run..."
+ echo "*********************************************************************************"
+ echo ""
+ $OMA_TEST_BIN
+fi
+echo "create oma-ds directory"
+if [ ! -d /opt/data/oma-ds ]
+then
+ mkdir /opt/data/oma-ds
+fi
+
+echo "deleting framework db files"
+if [ -d /usr/share/sync-agent-framework ]
+then
+ rm -rf /usr/share/sync-agent-framework
+fi
+
+echo "deleting db files"
+if [ -f /opt/dbspace/.omasyncagent.db ]
+then
+ rm -rf /opt/dbspace/.omasyncagent.db
+fi
+
+if [ -f /opt/dbspace/.omasyncagent.db-journal ]
+then
+ rm -rf /opt/dbspace/.omasyncagent.db-journal
+fi