Hi everybody,
I’m using PostgreSQL for a custom app I’m working on and to solve some configuration issues I wrote a bash script that is executed as serviceConfig.ExecStart = ...
and the last line of the bash script is postgres ...
.
I know this is not the best practice and I should rather execute the script in systemd.services.<name>.preStart
but I’d prefer to keep it during the development like this.
It works well except for stopping - when I try to stop the systemd service, it takes 2 min (default timeout time) and then logs show Killing process 7538 (postgres) with signal SIGKILL.
.
It’s pretty clear to me that stopping the systemd service means sending a stop SIGTERM to the bash script but then the bash script doesn’t propagate it to postgres
. Is there a way how to fix that / improve the bash script?
Thank you.