1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
#!/bin/sh
set -e
getent group dpmmgr > /dev/null || \
addgroup --quiet --system dpmmgr
getent passwd dpmmgr > /dev/null || \
adduser --quiet --system --home /var/lib/dpm --shell /bin/sh \
--ingroup dpmmgr --disabled-password --disabled-login \
--gecos "DPM manager" dpmmgr
chown dpmmgr:dpmmgr /var/lib/dpm
chown dpmmgr:dpmmgr /var/log/dpm
update-alternatives --install /usr/sbin/dpm dpm \
/usr/lib/dpm-postgres/dpm 10 \
--slave /usr/share/man/man8/dpm.8.gz dpm.8.gz \
/usr/lib/dpm-postgres/dpm.8.gz \
--slave /usr/share/dpm/DPMCONFIG.templ DPMCONFIG.templ \
/usr/lib/dpm-postgres/DPMCONFIG.templ \
--slave /etc/init.d/dpm dpm.init \
/etc/dpm-postgres/dpm.init \
--slave /etc/default/dpm dpm.conf \
/etc/dpm-postgres/dpm.conf \
--slave /etc/logrotate.d/dpm dpm.logrotate \
/etc/dpm-postgres/dpm.logrotate \
--slave /usr/sbin/dpm-shutdown dpm-shutdown \
/usr/lib/dpm-postgres/dpm-shutdown \
--slave /usr/share/man/man8/dpm-shutdown.8.gz dpm-shutdown.8.gz \
/usr/lib/dpm-postgres/dpm-shutdown.8.gz
if [ -x "/etc/init.d/dpm" ]; then
update-rc.d dpm defaults >/dev/null
if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
invoke-rc.d dpm start || exit $?
else
/etc/init.d/dpm start || exit $?
fi
fi
#DEBHELPER#
|