--- ./extras/startup-scripts/patroni 2017-09-08 10:56:09.000000000 +0200 +++ debian/patroni.init 2017-09-14 14:49:36.103403273 +0200 @@ -18,7 +18,7 @@ GROUP="postgres" NAME=patroni -PATRONI="/opt/patroni/$NAME.py" +PATRONI="/usr/bin/$NAME" PIDFILE="/var/run/$NAME.pid" # Set this parameter, if you have several Postgres versions installed @@ -114,6 +114,12 @@ kill -HUP $CHILDPID ;; + force-reload) + log_success_msg "Rorce-reloading Patroni configuration" + get_pid + kill -HUP $CHILDPID + ;; + status) get_pid if start-stop-daemon -T --pid $CHILDPID; then @@ -130,7 +136,7 @@ ;; *) - echo "Usage: /etc/init.d/$NAME {start|stop|restart|reload|status}" + echo "Usage: /etc/init.d/$NAME {start|stop|restart|reload|force-reload|status}" exit 1 ;; esac --- ./extras/startup-scripts/patroni.service 2017-09-08 10:56:09.000000000 +0200 +++ debian/patroni.service 2017-09-14 14:50:02.095431685 +0200 @@ -1,9 +1,6 @@ -# This is an example systemd config file for Patroni -# You can copy it to "/etc/systemd/system/patroni.service", - [Unit] Description=Runners to orchestrate a high-availability PostgreSQL -After=syslog.target network.target +After=network.target [Service] Type=simple @@ -11,11 +8,7 @@ User=postgres Group=postgres -# Where to send early-startup messages from the server -# This is normally controlled by the global default set by systemd -# StandardOutput=syslog - -ExecStart=/bin/patroni /etc/patroni.yml +ExecStart=/usr/bin/patroni /etc/patroni/config.yml # only kill the patroni process, not it's children, so it will gracefully stop postgres KillMode=process