Remove cyr_systemd_helper completely.

It turns that, at least in cyrus 3, the cyr_systemd_helper script will
end up wiping out your databases every time the daemon starts.  It was
something that was needed to handle the horror that was Berkeley
DB/Sleepycat DB/whatever it's called today, but Cyrus no longer supports
BDB and so there's no point.
This commit is contained in:
Jason Tibbitts 2017-05-25 11:01:50 -05:00
parent b9bfd810a7
commit f33aeb9844
3 changed files with 0 additions and 42 deletions

View File

@ -1,38 +0,0 @@
#!/bin/sh
# get_config [config default]
# extracts config option from config file
get_config() {
if conf=$(grep "^$1" /etc/imapd.conf); then
echo $conf | cut -d: -f2
else
echo $2
fi
}
CONFIGDIRECTORY=$(get_config configdirectory /var/lib/imap)
RETVAL=0
start() {
cd $CONFIGDIRECTORY
runuser - cyrus -s /bin/sh -c "umask 166 ; /usr/lib/cyrus-imapd/cvt_cyrusdb_all > ${CONFIGDIRECTORY}/rpm/db_import.log 2>&1" < /dev/null
RETVAL=$?
}
stop() {
cd $CONFIGDIRECTORY
runuser - cyrus -s /bin/sh -c "umask 166 ; /usr/lib/cyrus-imapd/cvt_cyrusdb_all export > ${CONFIGDIRECTORY}/rpm/db_export.log 2>&1" < /dev/null
RETVAL=$?
}
case "$1" in
start)
start
;;
stop)
stop
;;
*)
;;
esac
exit $RETVAL

View File

@ -8,9 +8,7 @@ After=cyrus-imapd-init.service
[Service]
Type=simple
EnvironmentFile=/etc/sysconfig/cyrus-imapd
ExecStartPre=/usr/lib/cyrus-imapd/cyr_systemd_helper start
ExecStart=/usr/lib/cyrus-imapd/cyrus-master $CYRUSOPTIONS
ExecStopPost=/usr/lib/cyrus-imapd/cyr_systemd_helper stop
PrivateTmp=true
# Cyrus may spawn many processes in normal operation. These figures are higher

View File

@ -34,7 +34,6 @@ Source15: cyrus-imapd.cron-daily
Source16: README.rpm
Source17: cyrus-imapd.service
Source18: cyrus-imapd-init.service
Source19: cyr_systemd_helper
# Source files for running the Cassandane test suite at build time.
Source80: https://github.com/cyrusimap/cassandane/archive/%cmt1.tar.gz#/cassandane-%{scmt %cmt1}.tar.gz
@ -332,7 +331,6 @@ END
install -p -D -m 644 %SOURCE17 %buildroot/%_unitdir/cyrus-imapd.service
install -p -D -m 644 %SOURCE18 %buildroot/%_unitdir/cyrus-imapd-init.service
install -p -D -m 755 %SOURCE19 %buildroot/%cyrexecdir/cyr_systemd_helper
# Cleanup of doc dir
find doc perl -name CVS -type d -prune -exec rm -rf {} \;