--- a/repmgr.conf.sample 2022-05-25 08:59:51.000000000 +0200 +++ b/repmgr.conf.sample 2022-07-09 18:14:43.340004816 +0200 @@ -60,7 +60,7 @@ # Server settings #------------------------------------------------------------------------------ -#config_directory='' # If configuration files are located outside the data +config_directory='/etc/postgresql' # If configuration files are located outside the data # directory, specify the directory where the main # postgresql.conf file is located. @@ -104,7 +104,7 @@ #log_level='INFO' # Log level: possible values are DEBUG, INFO, NOTICE, # WARNING, ERROR, ALERT, CRIT or EMERG -#log_facility='STDERR' # Logging facility: possible values are STDERR, or for +log_facility='LOCAL0' # Logging facility: possible values are STDERR, or for # syslog integration, one of LOCAL0, LOCAL1, ..., LOCAL7, USER #log_file='' # STDERR can be redirected to an arbitrary file @@ -383,27 +383,23 @@ ssh_options='-q -o ConnectTimeout=10' # # If you use sudo, the user repmgr runs as (usually 'postgres') must have # passwordless sudo access to execute the command. # -# For example, to use systemd, you can set +# For example, to use OpenRC, you can set # -# service_start_command = 'sudo systemctl start postgresql-9.6' +# service_start_command = 'sudo /etc/init.d/postgresql start' # (...) # # and then use the following sudoers configuration: # # # this is required when running sudo over ssh without -t: # Defaults:postgres !requiretty -# postgres ALL = NOPASSWD: /usr/bin/systemctl stop postgresql-9.6, \ -# /usr/bin/systemctl start postgresql-9.6, \ -# /usr/bin/systemctl restart postgresql-9.6 -# -# Debian/Ubuntu users: use "sudo pg_ctlcluster" to execute service control commands. +# postgres ALL = NOPASSWD: /etc/init.d/postgresql # # For more details, see: https://repmgr.org/docs/current/configuration-file-service-commands.html -#service_start_command = '' -#service_stop_command = '' -#service_restart_command = '' -#service_reload_command = '' +service_start_command = 'doas -n /etc/init.d/postgresql start' +service_stop_command = 'doas -n /etc/init.d/postgresql stop' +service_restart_command = 'doas -n /etc/init.d/postgresql restart' +service_reload_command = 'doas -n /etc/init.d/postgresql reload' #service_promote_command = '' # This parameter is intended for systems which provide a # package-level promote command, such as Debian's # "pg_ctlcluster". *IMPORTANT*: it is *not* a substitute @@ -412,8 +408,8 @@ ssh_options='-q -o ConnectTimeout=10' # # Used by "repmgr service (start|stop)" to control repmgrd # -#repmgrd_service_start_command = '' -#repmgrd_service_stop_command = '' +repmgrd_service_start_command = 'doas -n /etc/init.d/repmgrd start' +repmgrd_service_stop_command = 'doas -n /etc/init.d/repmgrd stop' #------------------------------------------------------------------------------ # Status check thresholds