Skip to content

Commit

Permalink
#193 Fix service restart after debian package upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed May 24, 2017
1 parent 67d59c0 commit 358663b
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions package/debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,29 @@ deleteGroup() {

# #######################################

case "$1" in
configure)
addGroup thehive ""
addUser thehive "" thehive "thehive daemon-user" "/bin/false"

# Chown definitions created by SBT Native Packager

chown thehive:thehive /var/log/thehive
chown root:thehive /etc/thehive/application.conf /etc/thehive/logback.xml
chmod 0640 /etc/thehive/application.conf /etc/thehive/logback.xml
mkdir -p /opt/thehive/conf

test -n "$2" && service thehive start
exit 0
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac


addGroup thehive ""
addUser thehive "" thehive "thehive daemon-user" "/bin/false"

# Chown definitions created by SBT Native Packager

chown thehive:thehive /var/log/thehive
chown root:thehive /etc/thehive/application.conf /etc/thehive/logback.xml
chmod 0640 /etc/thehive/application.conf /etc/thehive/logback.xml
mkdir -p /opt/thehive/conf

0 comments on commit 358663b

Please sign in to comment.