mbd-nginx.eklendi

This commit is contained in:
milisbir 2017-07-21 20:44:45 +03:00
parent fa4c7534dc
commit c06960a05a
2 changed files with 122 additions and 0 deletions

View File

@ -75,6 +75,16 @@ kur-hiawatha: dizinleri-olustur
ln -sf ../init.d/hiawatha ${EXTDIR}/rc.d/rc4.d/S32hiawatha ln -sf ../init.d/hiawatha ${EXTDIR}/rc.d/rc4.d/S32hiawatha
ln -sf ../init.d/hiawatha ${EXTDIR}/rc.d/rc5.d/S32hiawatha ln -sf ../init.d/hiawatha ${EXTDIR}/rc.d/rc5.d/S32hiawatha
ln -sf ../init.d/hiawatha ${EXTDIR}/rc.d/rc6.d/K28hiawatha ln -sf ../init.d/hiawatha ${EXTDIR}/rc.d/rc6.d/K28hiawatha
kur-nginx: dizinleri-olustur
install -m ${MODE} mbd/init.d/nginx ${EXTDIR}/rc.d/init.d/
ln -sf ../init.d/nginx ${EXTDIR}/rc.d/rc0.d/K28nginx
ln -sf ../init.d/nginx ${EXTDIR}/rc.d/rc1.d/K28nginx
ln -sf ../init.d/nginx ${EXTDIR}/rc.d/rc2.d/K28nginx
ln -sf ../init.d/nginx ${EXTDIR}/rc.d/rc3.d/S32nginx
ln -sf ../init.d/nginx ${EXTDIR}/rc.d/rc4.d/S32nginx
ln -sf ../init.d/nginx ${EXTDIR}/rc.d/rc5.d/S32nginx
ln -sf ../init.d/nginx ${EXTDIR}/rc.d/rc6.d/K28nginx
kur-php: dizinleri-olustur kur-php: dizinleri-olustur
install -m ${MODE} mbd/init.d/php-fpm ${EXTDIR}/rc.d/init.d/ install -m ${MODE} mbd/init.d/php-fpm ${EXTDIR}/rc.d/init.d/
@ -638,6 +648,16 @@ sil-hiawatha:
rm -f ${EXTDIR}/rc.d/rc4.d/S32hiawatha rm -f ${EXTDIR}/rc.d/rc4.d/S32hiawatha
rm -f ${EXTDIR}/rc.d/rc5.d/S32hiawatha rm -f ${EXTDIR}/rc.d/rc5.d/S32hiawatha
rm -f ${EXTDIR}/rc.d/rc6.d/K28hiawatha rm -f ${EXTDIR}/rc.d/rc6.d/K28hiawatha
sil-nginx:
rm -f ${EXTDIR}/rc.d/init.d/nginx
rm -f ${EXTDIR}/rc.d/rc0.d/K28nginx
rm -f ${EXTDIR}/rc.d/rc1.d/K28nginx
rm -f ${EXTDIR}/rc.d/rc2.d/K28nginx
rm -f ${EXTDIR}/rc.d/rc3.d/S32nginx
rm -f ${EXTDIR}/rc.d/rc4.d/S32nginx
rm -f ${EXTDIR}/rc.d/rc5.d/S32nginx
rm -f ${EXTDIR}/rc.d/rc6.d/K28nginx
sil-php: sil-php:
rm -f ${EXTDIR}/rc.d/init.d/php-fpm rm -f ${EXTDIR}/rc.d/init.d/php-fpm

View File

@ -0,0 +1,102 @@
#!/bin/sh
#
# Nginx daemon control script.
# Written for Slackware Linux by Cherife Li <cherife-#-dotimes.com>.
# milisarge milisarge@gmail.com>.
BIN=/usr/sbin/nginx
CONF=/etc/nginx/nginx.conf
PID=/var/run/nginx.pid
nginx_start() {
# Sanity checks.
if [ ! -r $CONF ]; then # no config file, exit:
echo "$CONF dosyasi yok.iptal edildi."
exit 1
fi
if [ -s $PID ]; then
echo "Nginx zaten calisiyor?"
exit 1
fi
echo "Nginx baslatiliyor..."
if [ -x $BIN ]; then
$BIN -c $CONF
fi
}
nginx_test_conf() {
echo "Nginx ayarlari kontrol ediliyor..."
$BIN -t -c $CONF
}
nginx_term() {
echo "Nginx hizlica kapatiliyor..."
kill -TERM $(cat $PID)
}
nginx_stop() {
echo "Nginx kapatiliyor..."
kill -QUIT $(cat $PID)
}
nginx_reload() {
echo "Nginx ayarları yeniden yukleniyor..."
kill -HUP $(cat $PID)
}
nginx_winch() {
echo "Nginx eski süreçleri kapatıyor..."
kill -WINCH $(cat $PID.oldbin)
}
nginx_upgrade() {
echo "Nginx ikili dosyası üst sürüme geciriliyor."
kill -USR2 $(cat $PID)
sleep 3
kill -QUIT $(cat $PID.oldbin)
}
nginx_rotate() {
echo "Nginx kayitlari ayarlaniyor..."
kill -USR1 $(cat $PID)
}
nginx_restart() {
nginx_stop
sleep 3
nginx_start
}
case "$1" in
check)
nginx_test_conf
;;
start)
nginx_start
;;
term)
nginx_term
;;
stop)
nginx_stop
;;
reload)
nginx_reload
;;
winch)
nginx_winch
;;
restart)
nginx_restart
;;
upgrade)
nginx_upgrade
;;
rotate)
nginx_rotate
;;
*)
echo "usage: `basename $0` {check|start|term|stop|winch|reload|restart|upgrade|rotate}"
esac