diff --git a/cyr_systemd_helper b/cyr_systemd_helper deleted file mode 100755 index 2d9ad56..0000000 --- a/cyr_systemd_helper +++ /dev/null @@ -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 diff --git a/cyrus-imapd.service b/cyrus-imapd.service index 9fe5df7..2d28731 100644 --- a/cyrus-imapd.service +++ b/cyrus-imapd.service @@ -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 diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index 7f23673..c033fb9 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -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 {} \;