Sophie

Sophie

distrib > PLD > th > x86_64 > by-pkgid > e864cbe75ce9d276134bb4f5f51b390e > scriptlet

nginx-mod_http_cache_purge-1.22.1-2.x86_64.rpm

POSTIN

/bin/sh

if [ "$1" = "1" ]; then 
	
	
 
if [ $1 -eq 1 ] && [ -x "/lib/systemd/systemd-update-helper" ]; then 
    # Initial installation 
    /lib/systemd/systemd-update-helper install-system-units nginx.service || : 
fi 

	{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/nginx ] && . /etc/sysconfig/nginx
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ ! -x /bin/systemd_booted ] || ! /bin/systemd_booted; then
if [ -f /var/lock/subsys/nginx ]; then
/sbin/service nginx force-reload 1>&2 || :;
else
echo 'Run "/sbin/service nginx start" to start nginx service.'
fi
fi
else
if [ ! -x /bin/systemd_booted ] || ! /bin/systemd_booted; then
if [ -f /var/lock/subsys/nginx ]; then
echo 'Run "/sbin/service nginx restart" to restart nginx service.'
fi
else	NORESTART=1	# for %%systemd_post if called after
fi
fi };
	 
fi

POSTUN

/bin/sh

if [ "$1" = "0" ]; then 
	
	
 
if [ $1 -eq 1 ] && [ -x "/lib/systemd/systemd-update-helper" ]; then 
    # Initial installation 
    /lib/systemd/systemd-update-helper install-system-units nginx.service || : 
fi 

	{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/nginx ] && . /etc/sysconfig/nginx
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ ! -x /bin/systemd_booted ] || ! /bin/systemd_booted; then
if [ -f /var/lock/subsys/nginx ]; then
/sbin/service nginx force-reload 1>&2 || :;
else
echo 'Run "/sbin/service nginx start" to start nginx service.'
fi
fi
else
if [ ! -x /bin/systemd_booted ] || ! /bin/systemd_booted; then
if [ -f /var/lock/subsys/nginx ]; then
echo 'Run "/sbin/service nginx restart" to restart nginx service.'
fi
else	NORESTART=1	# for %%systemd_post if called after
fi
fi };
	 
fi