diff --git a/build.sbt b/build.sbt index 914d279af..5bc4022a2 100644 --- a/build.sbt +++ b/build.sbt @@ -94,7 +94,7 @@ linuxEtcDefaultTemplate in Debian := (baseDirectory.value / "package" / "etc_def linuxMakeStartScript in Debian := None // RPM // -rpmRelease := "2" +rpmRelease := "1" rpmVendor in Rpm := "TheHive Project" rpmUrl := Some("http://thehive-project.org/") rpmLicense := Some("AGPL") diff --git a/package/debian/postinst b/package/debian/postinst index d1c6cf16f..c5c0b8cd1 100755 --- a/package/debian/postinst +++ b/package/debian/postinst @@ -76,12 +76,26 @@ deleteGroup() { # ####################################### +case "$1" in + configure) + addGroup cortex "" + addUser cortex "" cortex "cortex daemon-user" "/bin/false" -addGroup cortex "" -addUser cortex "" cortex "cortex daemon-user" "/bin/false" + # Chown definitions created by SBT Native Packager + + chown cortex:cortex /var/log/cortex + chown root:cortex /etc/cortex/application.conf /etc/cortex/logback.xml + chmod 0640 /etc/cortex/application.conf /etc/cortex/logback.xml + + test -n "$2" && service cortex start + exit 0 + ;; + abort-upgrade|abort-remove|abort-deconfigure) + ;; + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac -# Chown definitions created by SBT Native Packager -chown cortex:cortex /var/log/cortex -chown root:cortex /etc/cortex/application.conf /etc/cortex/logback.xml -chmod 0640 /etc/cortex/application.conf /etc/cortex/logback.xml