Automatically start systemd service if config file is present (#800)

Previously, upgrading the deb package stopped the service but didn't reenable it after a successful upgrade. This made upgrading the package more difficult and required a second step to restart the service. With this commit, the systemd service is automatically started when the default config file is present.
This commit is contained in:
Sebastian Serth
2024-09-06 16:07:01 +02:00
committed by GitHub
parent f0865ca616
commit 88b2afb19b

View File

@@ -7,3 +7,7 @@ systemctl enable pgcat
if ! id pgcat 2> /dev/null; then
useradd -s /usr/bin/false pgcat
fi
if [ -f /etc/pgcat.toml ]; then
systemctl start pgcat
fi