diff --git a/build/fpm-piler-after-install.sh b/build/fpm-piler-after-install.sh index 62b75885..8c78e1e4 100755 --- a/build/fpm-piler-after-install.sh +++ b/build/fpm-piler-after-install.sh @@ -157,6 +157,12 @@ if [[ $(pgrep -c systemd) -gt 0 && -x /bin/systemctl ]]; then systemctl daemon-reload fi +for i in piler piler-smtp pilersearch tika; do + if [[ -f "/lib/systemd/system/${i}.service" ]]; then + /usr/bin/systemctl enable --now "${i}.service" + fi +done + if [[ -f /var/piler/www/config.php ]]; then PILER_VERSION="$( piler -v )" for f in /var/piler/www/config.php /var/piler/www/vue/Footer.vue; do diff --git a/util/postinstall.sh.in b/util/postinstall.sh.in index 4f492e43..5051da8a 100755 --- a/util/postinstall.sh.in +++ b/util/postinstall.sh.in @@ -460,6 +460,17 @@ webui_install() { } +restart_services() { + echo; echo "Restarting services."; echo + + for i in piler piler-smtp pilersearch tika; do + if [[ -f "/lib/systemd/system/${i}.service" ]]; then + /usr/bin/systemctl restart "${i}.service" + fi + done +} + + clean_up_temp_stuff() { rm -f "$CRON_TMP" @@ -485,5 +496,6 @@ make_new_key show_summary execute_post_install_tasks +restart_services clean_up_temp_stuff