aboutsummaryrefslogtreecommitdiff
path: root/databases/slony1v2/files
diff options
context:
space:
mode:
Diffstat (limited to 'databases/slony1v2/files')
-rw-r--r--databases/slony1v2/files/pkg-message.in26
-rw-r--r--databases/slony1v2/files/slon-mkservice.sh.in38
-rw-r--r--databases/slony1v2/files/slon.conf-sample16
-rw-r--r--databases/slony1v2/files/slon.sh.in108
4 files changed, 0 insertions, 188 deletions
diff --git a/databases/slony1v2/files/pkg-message.in b/databases/slony1v2/files/pkg-message.in
deleted file mode 100644
index d63faf0d7d1b..000000000000
--- a/databases/slony1v2/files/pkg-message.in
+++ /dev/null
@@ -1,26 +0,0 @@
-**********************************************************************
-
-
-Please read the docs on configuring and runing slony-1. Unless you specified
-NOPORTDOCS, they are in the %%LOCALBASE%%/share/doc/slony1 directory.
-
-If you are upgrading from a prior version of slony, please read the UPGRADING
-file in the above docs directory.
-
-The script %%LOCALBASE%%/sbin/slon-mkservice can be used to create a control
-directory to run and monitor the slon daemon under svscan from daemontools.
-If you use this, be sure not to set slon_enable="YES" in /etc/rc.conf.
-
-If you prefer to use the standard startup script in %%LOCALBASE%%/etc/rc.d then
-set slon_enable="YES" in /etc/rc.conf to enable the slon.sh script.
-
-To use either of the above startup configurations, you will need to set up a
-%%LOCALBASE%%/etc/slon.conf file to tell slon what to replicate. This file
-is documented in %%LOCALBASE%%/share/doc/slony1/adminguide/runtime-config.html
-
-%%PERLTOOLS%%To use the perl slony configuration and monitoring tools, you must
-%%PERLTOOLS%%create %%LOCALBASE%%/etc/slon_tools.conf based on the sample file.
-
-
-
-**********************************************************************
diff --git a/databases/slony1v2/files/slon-mkservice.sh.in b/databases/slony1v2/files/slon-mkservice.sh.in
deleted file mode 100644
index ea77e07c0677..000000000000
--- a/databases/slony1v2/files/slon-mkservice.sh.in
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-
-# create a slon service directory for use with svscan from deamontools
-
-echo -n 'specify directory for "slon" service like "/var/slon-master": '
-read DIR
-if [ -z "$DIR" ]; then
- echo "Directory must be non-empty"
- exit 1;
-fi
-
-echo -n 'System user name for programs to run under (default pgsql): '
-read sysuser
-if [ -z "$sysuser" ]; then
- echo "User name pgsql being used."
- sysuser='pgsql'
-fi
-
-mkdir -p ${DIR}/env ${DIR}/supervise || exit 1
-mkdir -p ${DIR}/log/main ${DIR}/log/supervise || exit 1
-
-cat > ${DIR}/run <<EOF
-#!/bin/sh
-exec 2>&1
-
-exec envdir ./env sh -c 'exec setuidgid ${sysuser} slon -f \${CONFIGFILE}'
-EOF
-chmod +x ${DIR}/run
-
-cat >${DIR}/log/run <<EOF
-#!/bin/sh
-exec setuidgid ${sysuser} multilog t ./main
-EOF
-chmod +x ${DIR}/log/run
-
-echo "%%PREFIX%%/etc/slon.conf" > ${DIR}/env/CONFIGFILE
-
-chown -R ${sysuser} ${DIR}
diff --git a/databases/slony1v2/files/slon.conf-sample b/databases/slony1v2/files/slon.conf-sample
deleted file mode 100644
index 96e94209ca01..000000000000
--- a/databases/slony1v2/files/slon.conf-sample
+++ /dev/null
@@ -1,16 +0,0 @@
-# sample config file. see share/doc/slony1/runtime-config.html
-# values are overridden by command line options.
-# not all settings are shown here.
-
-syslog 0
-log_level 4
-log_timestamp 1
-
-cluster_name sample
-conn_info 'dbname=pgbench user=postgres host=localhost port=5432'
-
-#sync_interval 100
-#sync_interval_timeout 1000
-#sync_group_maxsize 6
-#vac_frequency 3
-#desired_sync_time 60000
diff --git a/databases/slony1v2/files/slon.sh.in b/databases/slony1v2/files/slon.sh.in
deleted file mode 100644
index 9e7588e14b18..000000000000
--- a/databases/slony1v2/files/slon.sh.in
+++ /dev/null
@@ -1,108 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-# Modified by Brian A. Seklecki <bseklecki@collaborativefusion.com>
-# <lavalamp@spiritual-machines.org>
-# $Id$
-#
-
-# sed -e 's/%%PREFIX%%/\/usr\/local/g' < slon.in > slon
-
-# PROVIDE: slon
-# REQUIRE: postgresql
-# KEYWORD: shutdown
-
-. "/etc/rc.subr"
-
-name="slon"
-rcvar=`set_rcvar`
-
-load_rc_config "$name"
-_pidprefix="/var/run/${name}"
-pidfile="${_pidprefix}.pid" # Used as fall-through in event of no profiles
-
-# From global rc.conf(5); if unset, set them here
-[ -z "$slon_enable" ] && slon_enable="NO"
-[ -z "$slon_profiles" ] && slon_profiles=""
-
-configfile_path="/usr/local/etc/${name}.conf"
-command_args="-f ${configfile_path} -p ${pidfile} &"
-required_files="${configfile_path}"
-
-command="/usr/local/bin/slon"
-
-isProfile() {
- match=0;
- for curMember in $slon_profiles; do
- if [ "$curMember" = "$1" ]; then
- #echo "DEBUG: Match"
- match=1
- fi
- done
- return $match;
-}
-
-
-
-if [ -n "$2" ]; then
- profile="$2" # A profile argument has been given (presumably)
- if [ "x${slon_profiles}" != "x" ]; then # This checks that profiles are indeed defined
- echo "-- Profile: $profile --"
- # Now let's check to make sure that both the profile, the profile's config path variable, config file exists
- configfile_default_path="/usr/local/etc/${name}-${profile}.conf"
- configfile_override_varname="\$${name}_${profile}_configfile" # Basic string substitution gets variable name
- configfile_override_varname_nop="${name}_${profile}_configfile" # Basic string substitution gets variable name
- #echo "DEBUG default path: $configfile_default_path"
- #echo "DEBUG override variable name: $configfile_override_varname";
- #echo "DEBUG override variable name noprefix: $configfile_override_varname_nop";
- eval configfile_path=\${$configfile_override_varname_nop:-${configfile_default_path}} # e.g., $configfile_varname="$slon_sex_configfile"
- #echo "DEBUG final: $configfile_path";
- isProfile $profile
- searchForProfile=$?
- # testing for true
- if [ ! -r "$configfile_path" -o $searchForProfile -lt 1 ]; then
- echo "$0: no such profile defined, profile config file defined, or cant read profile config file!";
- exit 1;
- fi
- required_files=${configfile_path}
-
- pidfile_default="${_pidprefix}-${profile}.pid"
- eval pidfile=\${${name}_${profile}_pidfile:-${pidfile_default}}
-
- command_args="-f ${configfile_path} -p ${pidfile} &"
- #echo "DEBUG argspre: $command_args"
- #echo "DEBUG subst: ${name}_${profile}_flags"
- #eval echo "DEBUG subst: \$${name}_${profile}_flags"
- #eval echo "DEBUG subst2: command_args=\${${name}_${profile}_flags:-${command_args}}"
- eval command_args=\${${name}_${profile}_flags:-${command_args}}
- #echo "DEBUG args: $command_args"
- else
- echo "$0: extra profile argument ignored, no profiles defined"
- fi
-
-
-else
- # We get to here if $2 is not defined at command line, but we do have profiles
- # so apply $1 command to all profiles!
- # This block uses recursion to call ourself with each-profile defined as $2
- if [ "x${slon_profiles}" != "x" -a "x$1" != "x" ]; then
- if [ "x$1" != "xrestart" ]; then
- for profile in ${slon_profiles}; do
- echo "===> ${name} profile: ${profile}"
- /usr/local/etc/rc.d/${name} $1 ${profile}
- retcode="$?"
- if [ "0${retcode}" -ne 0 ]; then
- failed="${profile} (${retcode}) ${failed:-}"
- else
- success="${profile} ${success:-}"
- fi
- done
- exit 0
- else
- restart_precmd=""
- fi
- fi
-# else = no profile argument given
-fi
-
-run_rc_command "$1"