From 3f605c31ac7538d188a11b5d9d84cf2ed485bf23 Mon Sep 17 00:00:00 2001 From: Dennis Camera Date: Tue, 19 Jan 2021 17:18:27 +0100 Subject: [PATCH] [type/__postgres_conf] Add support for more init systems to restart service --- .../conf/type/__postgres_conf/gencode-remote | 35 +++++++++++++++++-- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/cdist/conf/type/__postgres_conf/gencode-remote b/cdist/conf/type/__postgres_conf/gencode-remote index fa930cc4..15d5bb3e 100755 --- a/cdist/conf/type/__postgres_conf/gencode-remote +++ b/cdist/conf/type/__postgres_conf/gencode-remote @@ -53,11 +53,9 @@ case ${os} in (openbsd) postgres_user='_postgresql' - restart_command='/etc/rc.d/postgresql restart' ;; (devuan) postgres_user='postgres' - restart_command='/etc/init.d/postgresql restart' ;; (*) echo "Unsupported OS: ${os}" >&2 @@ -103,6 +101,37 @@ cat <&2 + exit 1 + esac + ;; + (*) + printf "Don't know how to restart services with your init (%s)\n" "${init}" >&2 + exit 1 + esac + ) fi EOF