Re: repmgrd and rc-script

2024-03-01 Thread Uwe Werler
Ping

On 20 Feb 18:20, Uwe Werler wrote:
> Hi all,
> 
> because I use repmgrd for automatic failover together with repmgr I
> would like to add the rc-script for repmgrd as a default distributed with
> the pkg. Any thoughts?
> 
> Best regards
> 
> Uwe
> 
> Index: pkg/PLIST
> ===
> RCS file: /cvs/ports/databases/repmgr/pkg/PLIST,v
> retrieving revision 1.5
> diff -u -p -u -r1.5 PLIST
> --- pkg/PLIST 16 Nov 2022 03:01:21 -  1.5
> +++ pkg/PLIST 20 Feb 2024 17:19:56 -
> @@ -1,6 +1,7 @@
>  @bin bin/repmgr
>  @bin bin/repmgrd
>  @so lib/postgresql/repmgr.so
> +@rcscript ${RCDIR}/repmgrd
>  share/doc/repmgr/
>  share/doc/repmgr/README.md
>  share/examples/repmgr/
> Index: pkg/repmgrd.rc
> ===
> RCS file: pkg/repmgrd.rc
> diff -N pkg/repmgrd.rc
> --- /dev/null 1 Jan 1970 00:00:00 -
> +++ pkg/repmgrd.rc20 Feb 2024 17:19:56 -
> @@ -0,0 +1,11 @@
> +#!/bin/ksh
> +
> +daemon="/usr/local/bin/repmgrd"
> +
> +daemon_user="_postgresql"
> +
> +daemon_flags="-d"
> +
> +. /etc/rc.d/rc.subr
> +
> +rc_cmd $1
> 

-- 
wq: ~uw



repmgrd and rc-script

2024-02-20 Thread Uwe Werler
Hi all,

because I use repmgrd for automatic failover together with repmgr I
would like to add the rc-script for repmgrd as a default distributed with
the pkg. Any thoughts?

Best regards

Uwe

Index: pkg/PLIST
===
RCS file: /cvs/ports/databases/repmgr/pkg/PLIST,v
retrieving revision 1.5
diff -u -p -u -r1.5 PLIST
--- pkg/PLIST   16 Nov 2022 03:01:21 -  1.5
+++ pkg/PLIST   20 Feb 2024 17:19:56 -
@@ -1,6 +1,7 @@
 @bin bin/repmgr
 @bin bin/repmgrd
 @so lib/postgresql/repmgr.so
+@rcscript ${RCDIR}/repmgrd
 share/doc/repmgr/
 share/doc/repmgr/README.md
 share/examples/repmgr/
Index: pkg/repmgrd.rc
===
RCS file: pkg/repmgrd.rc
diff -N pkg/repmgrd.rc
--- /dev/null   1 Jan 1970 00:00:00 -
+++ pkg/repmgrd.rc  20 Feb 2024 17:19:56 -
@@ -0,0 +1,11 @@
+#!/bin/ksh
+
+daemon="/usr/local/bin/repmgrd"
+
+daemon_user="_postgresql"
+
+daemon_flags="-d"
+
+. /etc/rc.d/rc.subr
+
+rc_cmd $1