Skip to content

Commit 88b2afb

Browse files
authored
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.
1 parent f0865ca commit 88b2afb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

postinst

+4
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ systemctl enable pgcat
77
if ! id pgcat 2> /dev/null; then
88
useradd -s /usr/bin/false pgcat
99
fi
10+
11+
if [ -f /etc/pgcat.toml ]; then
12+
systemctl start pgcat
13+
fi

0 commit comments

Comments
 (0)