nginx.paketlendi
This commit is contained in:
parent
7b8312c9a5
commit
59412a11f7
|
@ -1,7 +1,7 @@
|
|||
id www 2>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "User www already exit"
|
||||
echo "www kullanicisi zaten tanimli"
|
||||
else
|
||||
echo "User www created"
|
||||
echo "www kullanicisi olusturuldu"
|
||||
useradd -M -s /bin/false -c "www user" www
|
||||
fi
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
create 640 nginx adm
|
||||
sharedscripts
|
||||
postrotate
|
||||
[ -f /var/run/nginx.pid ] && \
|
||||
kill -USR1 `cat /var/run/nginx.pid`
|
||||
[ -f /var/run/nginx.pid ] && kill -USR1 `cat /var/run/nginx.pid`
|
||||
endscript
|
||||
}
|
||||
|
|
|
@ -1,55 +0,0 @@
|
|||
#!/bin/sh
|
||||
########################################################################
|
||||
# Begin nginx.service
|
||||
#
|
||||
# Description : nginx init script
|
||||
#
|
||||
# Author : alienus at nutyx dot org
|
||||
#
|
||||
# Version : LFS 7.5
|
||||
#
|
||||
# Notes : NuTyX saravane
|
||||
#
|
||||
########################################################################
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: nginx init script
|
||||
# Required-Start:
|
||||
# Should-Start:
|
||||
# Required-Stop:
|
||||
# Should-Stop:
|
||||
# Default-Start:
|
||||
# Default-Stop:
|
||||
# Short-Description: Start, stop and restart the nginx server
|
||||
# Description:
|
||||
# X-LFS-Provided-By:
|
||||
### END INIT INFO
|
||||
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
case "${1}" in
|
||||
start)
|
||||
log_info_msg "Starting..."
|
||||
start_daemon /usr/sbin/nginx # fully_qualified_path
|
||||
;;
|
||||
|
||||
stop)
|
||||
log_info_msg "Stopping..."
|
||||
killproc /usr/sbin/nginx # fully_qualified_path
|
||||
;;
|
||||
|
||||
restart)
|
||||
${0} stop
|
||||
sleep 1
|
||||
${0} start
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: ${0} {start|stop|restart}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# End scriptname
|
|
@ -0,0 +1,93 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Nginx daemon control script.
|
||||
# Written for Slackware Linux by Cherife Li <cherife-#-dotimes.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_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
|
||||
;;
|
||||
restart)
|
||||
nginx_restart
|
||||
;;
|
||||
upgrade)
|
||||
nginx_upgrade
|
||||
;;
|
||||
rotate)
|
||||
nginx_rotate
|
||||
;;
|
||||
*)
|
||||
echo "usage: `basename $0` {check|start|term|stop|reload|restart|upgrade|rotate}"
|
||||
esac
|
|
@ -4,17 +4,17 @@
|
|||
# Depends on: libxml2 libxslt pcre
|
||||
|
||||
name=nginx
|
||||
version=1.6.2
|
||||
release=2
|
||||
version=1.11.13
|
||||
release=1
|
||||
|
||||
source=(http://nginx.org//download/$name-$version.tar.gz
|
||||
nginx.service
|
||||
nginx.servis
|
||||
nginx.logrotate)
|
||||
|
||||
# change those if you prefer another setup
|
||||
NGINXUSER=www
|
||||
NGINXGROUP=www
|
||||
HTMLDIR=/srv/http # be aware that apache use /srv/www
|
||||
HTMLDIR=/srv/http/nginx
|
||||
|
||||
# change those if you need those experimental modules
|
||||
# (idea from slackbuilds.org)
|
||||
|
@ -88,7 +88,7 @@ build() {
|
|||
-e '$s|.*| include /etc/nginx/conf.d/\*.conf;\n&|' \
|
||||
$PKG/etc/nginx/$name.conf
|
||||
# install the nginx init script
|
||||
install -Dm755 $SRC/nginx.service $PKG/etc/rc.d/init.d/nginx
|
||||
install -Dm755 $SRC/nginx.servis $PKG/etc/rc.d/init.d/nginx
|
||||
# install the logrotate file
|
||||
install -Dm644 $SRC/nginx.logrotate $PKG/etc/logrotate.d/nginx
|
||||
# fill the right user & group in the logrotate file
|
||||
|
|
Loading…
Reference in New Issue