Sindbad~EG File Manager

Current Path : /opt/nginxhttpd/
Upload File :
Current File : //opt/nginxhttpd/run.sh

if test -e /opt/nginxhttpd/nginxhttpd.lock ; then
	pid=`cat /opt/nginxhttpd/nginxhttpd.lock`
	if ! ps -p $pid > /dev/null ; then
        	echo "Curieux, le fichier de lock existe mais le processus semble mort"
		mutt -s "[SSL] Fichier de lock SSL present `hostname`" master@o2switch.fr < /dev/null
        else
		exit
	fi
fi

echo "$$" > /opt/nginxhttpd/nginxhttpd.lock

yes | cp -aR /etc/nginx/sites-enabled/ssl.conf /etc/nginx/sites-enabled/ssl.conf.last

ret=$(/usr/local/bin/php /opt/nginxhttpd/generator.php)

echo $ret >> /tmp/reloaded

if test $ret == 0 || '$ret' == '0'; then
	rm -f /opt/nginxhttpd/nginxhttpd.lock
	exit
fi

if /usr/local/sbin/nginx -t -c /etc/nginx/nginx.conf ; then
        test -f /etc/init.d/nginx && /etc/init.d/nginx graceful
	set +e
        date >> /tmp/reloaded
	systemctl reload nginx 2> /dev/null
	set -e
	rm -f /etc/nginx/sites-enabled/ssl.conf.last
else
	rm -f /etc/nginx/sites-enabled/ssl.conf
	mv /etc/nginx/sites-enabled/ssl.conf.last /etc/nginx/sites-enabled/ssl.conf
        mutt -s "[SSL] Erreur SSL URGENT `hostname`" master@o2switch.fr < /dev/null
fi

rm -f /opt/nginxhttpd/nginxhttpd.lock


Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists