Skip to content

Commit

Permalink
Echo what is postinst script doing
Browse files Browse the repository at this point in the history
  • Loading branch information
Salamek committed Mar 29, 2018
1 parent 27974c4 commit ecfbd07
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions debian/python3-blacklist.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,21 @@ case "$1" in

configure)
if [ -z "$2" ]; then
echo "Adding blacklist user"
useradd -m blacklist

systemctl daemon-reload
blacklist post_install --config_prod

echo "Startign blacklist service"
systemctl start blacklist

echo "Startign blacklist_celeryworker service"
systemctl start blacklist_celeryworker

echo "Startign blacklist_celerybeat service"
systemctl start blacklist_celerybeat

systemctl enable blacklist_celeryworker
systemctl enable blacklist_celerybeat
systemctl enable blacklist
Expand All @@ -21,14 +30,17 @@ case "$1" in
systemctl daemon-reload

if systemctl is-active --quiet blacklist || systemctl is-enabled --quiet blacklist; then
echo "Restarting blacklist service"
systemctl restart blacklist
fi

if systemctl is-active --quiet blacklist_celeryworker || systemctl is-enabled --quiet blacklist_celeryworker; then
echo "Restarting blacklist_celeryworker service"
systemctl restart blacklist_celeryworker
fi

if systemctl is-active --quiet blacklist_celerybeat || systemctl is-enabled --quiet blacklist_celerybeat; then
echo "Restarting blacklist_celerybeat service"
systemctl restart blacklist_celerybeat
fi
fi
Expand Down

0 comments on commit ecfbd07

Please sign in to comment.