diff --git a/debian/portail-citoyen2.init b/debian/portail-citoyen2.init index ce678ae..4512d5c 100644 --- a/debian/portail-citoyen2.init +++ b/debian/portail-citoyen2.init @@ -116,10 +116,16 @@ do_migrate() { log_action_msg ".. done" } +do_collectstatic() { + log_action_msg "Collect static files.." + su $USER -p -c "/usr/bin/portail-citoyen-manage collectstatic --noinput" + log_action_msg ".. done" +} case "$1" in start) do_migrate + do_collectstatic log_daemon_msg "Starting $DESC " "$NAME" do_start case "$?" in @@ -138,15 +144,15 @@ case "$1" in status) status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? ;; - #reload|force-reload) - # + reload|force-reload) + # If do_reload() is not implemented then leave this commented out - # and leave 'force-reload' as an alias for 'restart'. - # - #log_daemon_msg "Reloading $DESC" "$NAME" - #do_reload - #log_end_msg $? - #;; + # and leave 'force-reload' as an alias for 'restart'. + + log_daemon_msg "Reloading $DESC" "$NAME" + do_reload + log_end_msg $? + ;; restart|force-reload) # # If the "reload" option is implemented then remove the @@ -155,6 +161,7 @@ case "$1" in log_daemon_msg "Restarting $DESC" "$NAME" do_stop do_migrate + do_collectstatic case "$?" in 0|1) do_start diff --git a/debian/portail-citoyen2.postinst b/debian/portail-citoyen2.postinst index c7bdce5..2730a2a 100644 --- a/debian/portail-citoyen2.postinst +++ b/debian/portail-citoyen2.postinst @@ -63,10 +63,6 @@ case "$1" in dbc_pgsql_createdb_encoding="UTF8" dbc_go portail-citoyen $@ fi - - echo -n "Generating static files.." >&2 - su $USER -p -c "/usr/bin/portail-citoyen-manage collectstatic --noinput" >&2 - echo "..done" >&2 ;; reconfigure|abort-upgrade|abort-remove|abort-deconfigure)