Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:mbhangui
indimail-mta
_service:extract_file:archpkg3.install
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:extract_file:archpkg3.install of Package indimail-mta
_prefix=/usr _qmaildir=/var/indimail _sysconfdir=/etc/indimail _mandir=/usr/share/man _uid=555 _gid=555 # qmta pre_install() { ( # # Create user/groups indimail. Do not report any problems if it already # exists. # nscd_up=`ps -ef |grep nscd |grep -v grep|wc -l` if [ $nscd_up -ge 1 ] ; then if [ -x ${confdir}/init.d/nscd ] ; then ${confdir}/init.d/nscd stop elif [ -f ${confdir}/lib/systemd/system/multi-user.target/nscd.service ] ; then /bin/systemctl start nscd.service fi fi echo "Adding IndiMail users/groups" /usr/bin/getent group indimail > /dev/null || /usr/sbin/groupadd -r -g ${_gid} indimail || true if [ $? = 4 ] ; then /usr/sbin/groupadd indimail fi /usr/bin/getent group nofiles > /dev/null || /usr/sbin/groupadd nofiles || true /usr/bin/getent group qmail > /dev/null || /usr/sbin/groupadd qmail || true /usr/bin/getent group qscand > /dev/null || /usr/sbin/groupadd qscand || true /usr/bin/getent passwd indimail > /dev/null || /usr/sbin/useradd -r -g indimail -u ${_uid} -d ${_qmaildir} indimail || true if [ $? = 4 ] ; then /usr/sbin/useradd -r -g indimail -d ${_qmaildir} indimail fi /usr/bin/getent passwd alias > /dev/null || /usr/sbin/useradd -M -g nofiles -d ${_qmaildir}/alias -s /usr/bin/nologin alias || true /usr/bin/getent passwd qmailq > /dev/null || /usr/sbin/useradd -M -g qmail -d ${_qmaildir} -s /usr/bin/nologin qmailq || true /usr/bin/getent passwd qmailr > /dev/null || /usr/sbin/useradd -M -g qmail -d ${_qmaildir} -s /usr/bin/nologin qmailr || true /usr/bin/getent passwd qmails > /dev/null || /usr/sbin/useradd -M -g qmail -d ${_qmaildir} -s /usr/bin/nologin qmails || true /usr/bin/getent passwd qscand > /dev/null || /usr/sbin/useradd -M -g qscand -d ${_qmaildir}/qscanq -G qmail,qscand -s /usr/bin/nologin qscand || true rm -f /var/spool/mail/indimail if [ $nscd_up -ge 1 ] ; then if [ -x ${confdir}/init.d/nscd ] ; then ${confdir}/init.d/nscd start elif [ -f ${confdir}/lib/systemd/system/multi-user.target/nscd.service ] ; then /bin/systemctl start nscd.service fi fi move="/usr/lib/sendmail" if [ -L /usr/sbin ] ; then link=$(readlink /usr/sbin) if [ ! " $link" = " bin" -a ! " $link" = " /usr/bin" ] ; then move="$move /usr/sbin/sendmail" fi else move="$move /usr/sbin/sendmail" fi for i in $move; do if [ -f $i -a ! -L $i ]; then echo "! $i is a file, should be a link" 1>&2 mv $i $i.old /bin/ln -s ${_prefix}/bin/sendmail $i elif [ -L $i ];then mv $i $i.old /bin/ln -s ${_prefix}/bin/sendmail $i elif [ ! -f $i ];then echo "! $i is missing" /bin/ln -s ${_prefix}/bin/sendmail $i fi done if [ -f ${confdir}/pam.d/smtp -a ! -L ${confdir}/pam.d/smtp ] ; then echo "! ${confdir}/pam.d/smtp is a file, should be a link" 1>&2 mv ${confdir}/pam.d/smtp ${confdir}/pam.d/smtp.old /bin/ln -s ${confdir}/pam.d/pam.multi ${confdir}/pam.d/smtp fi for i in mailq newaliases; do if [ -f /usr/share/man/man1/$i.1.gz -a ! -L /usr/share/man/man1/$i.1.gz ] ; then echo "! /usr/share/man/man1/$i.1.gz is a file, should be a link" 1>&2 mv /usr/share/man/man1/$i.1.gz /usr/share/man/man1/$i.old.1.gz fi done ) >> /var/log/${pkgname}-setup.log } # qmta post_install() { ( if [ -f /etc/pam.d/smtp -a ! -L /etc/pam.d/smtp ] ; then echo "! /etc/pam.d/smtp is a file, should be a link" 1>&2 mv /etc/pam.d/smtp /etc/pam.d/smtp.old fi for i in mailq newaliases; do if [ -f /usr/share/man/man1/$i.1.gz -a ! -L /usr/share/man/man1/$i.1.gz ] ; then echo "! /usr/share/man/man1/$i.1.gz is a file, should be a link" 1>&2 mv /usr/share/man/man1/$i.1.gz /usr/share/man/man1/$i.old.1.gz fi done for i in /usr/lib/sendmail /usr/sbin/sendmail; do if [ -f $i -a ! -L $i ]; then echo "! $i is a file, should be a link" mv $i $i.old /bin/ln -s ${prefix}/bin/sendmail $i elif [ -L $i ];then mv $i $i.old /bin/ln -s ${prefix}/bin/sendmail $i elif [ ! -f $i ];then echo "! $i is missing" /bin/ln -s ${prefix}/bin/sendmail $i fi done if [ ! -f ${_sysconfdir}/control/idhost ] ; then default_host=$([ -n "$HOSTNAME" ] && echo "$HOSTNAME" || uname -n) echo $default_host > ${_sysconfdir}/control/idhost fi mkdir -p ${_qmaildir}/queue queue-fix ${_qmaildir}/queue/qmta ) >> /var/log/${pkgname}-setup.log } # qmta pre_upgrade() { ( count=$(ps -ef|grep qmta-send|grep -v grep|wc -l) if [ $count -gt 0 ] ; then touch /var/tmp/.qmta-send.down fi if test -f ${confdir}/systemd/system/multi-user.target.wants/qmta-send.service then systemctl stop qmta-send >/dev/null 2>&1 fi ) >> /var/log/${pkgname}-setup.log } # qmta post_upgrade() { ( echo "checking if system boot scripts need upgrade" if [ -x /bin/systemctl -a -d /lib/systemd/system ] ; then cmp -s ${_shareddir}/boot/qmta-send.sevice /lib/systemd/system/qmta-send.service >/dev/null 2>&1 || \ (cp ${_shareddir}/boot/systemd /lib/systemd/system/qmta-send.service && /bin/systemctl daemon-reload && echo "installed new svscan service") elif [ -x /bin/systemctl -a -d /usr/lib/systemd/system ] ; then cmp -s ${_shareddir}/boot/qmta-send.service /usr/lib/systemd/system/qmta-send.service >/dev/null 2>&1 || \ (cp ${_shareddir}/boot/systemd /usr/lib/systemd/system/qmta-send.service && /bin/systemctl daemon-reload && echo "installed new svscan service") fi # restart svscan service if we find /var/tmp/.qmta-send.down if [ -f /var/tmp/.qmta-send.down ] ; then rm -f /var/tmp/.qmta-send.down echo "Starting qmta-send" if test -f ${confdir}/systemd/system/multi-user.target.wants/svscan.service then /bin/systemctl start qmta-send > /dev/null 2>&1 fi fi ) >> /var/log/${pkgname}-setup.log } post_remove() { ( for i in /usr/lib/sendmail /usr/sbin/sendmail ${confdir}/pam.d/smtp; do if [ -f $i.old -o -L $i.old ]; then echo "restoring $i" mv $i.old $i fi done for i in mailq newaliases; do if [ -f /usr/share/man/man1/$i.old.1.gz ] ; then echo "restoring /usr/share/man/man1/$i.1.gz" mv /usr/share/man/man1/$i.old.1.gz /usr/share/man/man1/$i.1.gz fi done ) >> /var/log/${pkgname}-setup.log }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor