Sophie

Sophie

distrib > Fedora > 18 > x86_64 > media > updates > by-pkgid > f225ffe5a1377c3b7ce801fd0287973e > scriptlet

lfc-server-mysql-1.8.7-4.fc18.x86_64.rpm

PREIN

/bin/sh
getent group lfcmgr > /dev/null || groupadd -r lfcmgr
getent passwd lfcmgr > /dev/null || useradd -r -g lfcmgr \
    -d /var/lib/lfc -s /bin/bash -c "LFC Manager" lfcmgr
exit 0

PREUN

/bin/sh
export LANG=C

if [ $1 -eq 0 ]; then
    if ( /usr/sbin/update-alternatives --display lfcdaemon | \
	grep currently | grep -q lfc-mysql ) ; then
	
if [ $1 -eq 0 ] ; then 
        # Package removal, not upgrade 
        /usr/bin/systemctl --no-reload disable lfcdaemon.service > /dev/null 2>&1 || : 
        /usr/bin/systemctl stop lfcdaemon.service > /dev/null 2>&1 || : 
fi 
    fi
    /usr/sbin/update-alternatives --remove lfcdaemon \
	/usr/lib64/lfc-mysql/lfcdaemon
fi

POSTIN

/bin/sh
if [ -e /etc/init.d/lfcdaemon -a ! -h /etc/init.d/lfcdaemon ]; then
	rm /etc/init.d/lfcdaemon
fi
/usr/sbin/update-alternatives --install /usr/sbin/lfcdaemon lfcdaemon \
	  /usr/lib64/lfc-mysql/lfcdaemon 20 \
  --slave /usr/share/man/man8/lfcdaemon.8.gz lfcdaemon.8.gz \
	  /usr/lib64/lfc-mysql/lfcdaemon.8.gz \
  --slave /usr/share/lcgdm/NSCONFIG.templ NSCONFIG.templ \
	  /usr/lib64/lfc-mysql/NSCONFIG.templ \
  --slave /usr/lib/systemd/system/lfcdaemon.service lfcdaemon.service \
	  /usr/share/lfc-mysql/lfcdaemon.service \
  --slave /etc/logrotate.d/lfcdaemon lfcdaemon.logrotate \
	  /etc/lfc-mysql/lfcdaemon.logrotate \
  --slave /usr/sbin/lfc-shutdown lfc-shutdown \
	  /usr/lib64/lfc-mysql/lfc-shutdown \
  --slave /usr/share/man/man8/lfc-shutdown.8.gz lfc-shutdown.8.gz \
	  /usr/lib64/lfc-mysql/lfc-shutdown.8.gz


if [ $1 -eq 1 ] ; then 
        # Initial installation 
        /usr/bin/systemctl preset lfcdaemon.service >/dev/null 2>&1 || : 
fi

POSTUN

/bin/sh
export LANG=C

if [ $1 -ge 1 ]; then
    if ( /usr/sbin/update-alternatives --display lfcdaemon | \
	grep currently | grep -q lfc-mysql ) ; then
	
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : 
if [ $1 -ge 1 ] ; then 
        # Package upgrade, not uninstall 
        /usr/bin/systemctl try-restart lfcdaemon.service >/dev/null 2>&1 || : 
fi 
    fi
fi