mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
Nginx: New package. Version 1.3.11.
This commit is contained in:
1
config/backup/includes/nginx
Normal file
1
config/backup/includes/nginx
Normal file
@@ -0,0 +1 @@
|
||||
/etc/nginx/nginx.conf
|
||||
45
config/nginx/nginx
Executable file
45
config/nginx/nginx
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
# Begin $rc_base/init.d/nginx
|
||||
|
||||
# Based on sysklogd script from LFS-3.1 and earlier.
|
||||
# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
|
||||
|
||||
#$LastChangedBy: bdubbs $
|
||||
#$Date: 2005-08-01 14:29:19 -0500 (Mon, 01 Aug 2005) $
|
||||
|
||||
. /etc/sysconfig/rc
|
||||
. $rc_functions
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
boot_mesg "Starting nginx Server..."
|
||||
loadproc /usr/sbin/nginx
|
||||
;;
|
||||
|
||||
stop)
|
||||
boot_mesg "Stopping nginx Server..."
|
||||
killproc /usr/sbin/nginx
|
||||
;;
|
||||
|
||||
reload)
|
||||
boot_mesg "Reloading nginx Server..."
|
||||
reloadproc /usr/sbin/nginx
|
||||
;;
|
||||
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
|
||||
status)
|
||||
statusproc /usr/sbin/nginx
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|reload|restart|status}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# End $rc_base/init.d/nginx
|
||||
19
config/rootfiles/packages/nginx
Normal file
19
config/rootfiles/packages/nginx
Normal file
@@ -0,0 +1,19 @@
|
||||
etc/init.d/nginx
|
||||
etc/nginx/fastcgi.conf
|
||||
etc/nginx/fastcgi.conf.default
|
||||
etc/nginx/fastcgi_params
|
||||
etc/nginx/fastcgi_params.default
|
||||
etc/nginx/koi-utf
|
||||
etc/nginx/koi-win
|
||||
etc/nginx/mime.types
|
||||
etc/nginx/mime.types.default
|
||||
etc/nginx/nginx.conf
|
||||
etc/nginx/nginx.conf.default
|
||||
etc/nginx/scgi_params
|
||||
etc/nginx/scgi_params.default
|
||||
etc/nginx/uwsgi_params
|
||||
etc/nginx/uwsgi_params.default
|
||||
etc/nginx/win-utf
|
||||
etc/rc.d/init.d/nginx
|
||||
usr/nginx/html/50x.html
|
||||
usr/nginx/html/index.html
|
||||
104
lfs/nginx
Normal file
104
lfs/nginx
Normal file
@@ -0,0 +1,104 @@
|
||||
###############################################################################
|
||||
# #
|
||||
# IPFire.org - A linux based firewall #
|
||||
# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
|
||||
# #
|
||||
# This program is free software: you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation, either version 3 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# This program is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
###############################################################################
|
||||
# Definitions
|
||||
###############################################################################
|
||||
|
||||
include Config
|
||||
|
||||
VER = 1.3.11
|
||||
|
||||
THISAPP = nginx-$(VER)
|
||||
DL_FILE = $(THISAPP).tar.gz
|
||||
DL_FROM = $(URL_IPFIRE)
|
||||
DIR_APP = $(DIR_SRC)/$(THISAPP)
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)
|
||||
PROG = nginx
|
||||
PAK_VER = 1
|
||||
|
||||
###############################################################################
|
||||
# Top-level Rules
|
||||
###############################################################################
|
||||
|
||||
objects = $(DL_FILE)
|
||||
|
||||
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
|
||||
|
||||
$(DL_FILE)_MD5 = 4d299999bca4d2cecfbe48e51684a345
|
||||
|
||||
install : $(TARGET)
|
||||
|
||||
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
|
||||
|
||||
download :$(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
|
||||
md5 : $(subst %,%_MD5,$(objects))
|
||||
|
||||
dist:
|
||||
$(PAK)
|
||||
|
||||
###############################################################################
|
||||
# Downloading, checking, md5sum
|
||||
###############################################################################
|
||||
|
||||
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
|
||||
@$(CHECK)
|
||||
|
||||
$(patsubst %,$(DIR_DL)/%,$(objects)) :
|
||||
@$(LOAD)
|
||||
|
||||
$(subst %,%_MD5,$(objects)) :
|
||||
@$(MD5)
|
||||
|
||||
###############################################################################
|
||||
# Installation Details
|
||||
###############################################################################
|
||||
|
||||
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
@$(PREBUILD)
|
||||
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
|
||||
cd $(DIR_APP) && tar xvf $(DIR_SRC)/cache/nginx_tcp_proxy_module.tar.bz2 -C $(DIR_APP)
|
||||
cd $(DIR_APP) && patch -p1 < nginx_tcp_proxy_module/tcp.patch
|
||||
cd $(DIR_APP) && ./configure \
|
||||
--prefix=/usr/nginx/ \
|
||||
--conf-path=/etc/nginx/nginx.conf \
|
||||
--sbin-path=/usr/sbin/nginx \
|
||||
--pid-path=/var/run/nginx.pid \
|
||||
--lock-path=/var/lock/nginx.lock \
|
||||
--http-client-body-temp-path=/var/spool/nginx/client_body_temp \
|
||||
--http-proxy-temp-path=/var/spool/nginx/proxy_temp \
|
||||
--http-fastcgi-temp-path=/var/spool/nginx/fastcgi_temp \
|
||||
--http-log-path=/var/log/nginx/access.log \
|
||||
--error-log-path=/var/log/nginx/error.log \
|
||||
--user=http \
|
||||
--group=http \
|
||||
--with-imap --with-imap_ssl_module --with-http_ssl_module \
|
||||
--with-http_stub_status_module \
|
||||
--with-http_dav_module \
|
||||
--with-http_sub_module \
|
||||
--add-module=nginx_tcp_proxy_module/
|
||||
cd $(DIR_APP) && make $(MAKETUNING)
|
||||
cd $(DIR_APP) && make install
|
||||
mkdir -p /var/log/nginx /var/spool/nginx
|
||||
cp /usr/src/config/nginx/nginx /etc/init.d/
|
||||
# chown http:http /var/log/nginx
|
||||
# @rm -rf $(DIR_APP)
|
||||
@$(POSTBUILD)
|
||||
32
src/paks/nginx/install.sh
Normal file
32
src/paks/nginx/install.sh
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
############################################################################
|
||||
# #
|
||||
# This file is part of the IPFire Firewall. #
|
||||
# #
|
||||
# IPFire is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation; either version 2 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# IPFire is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with IPFire; if not, write to the Free Software #
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
# #
|
||||
# Copyright (C) 2007 IPFire-Team <info@ipfire.org>. #
|
||||
# #
|
||||
############################################################################
|
||||
#
|
||||
. /opt/pakfire/lib/functions.sh
|
||||
extract_files
|
||||
restore_backup ${NAME}
|
||||
|
||||
ln -svf ../init.d/nginx /etc/rc.d/rc0.d/K20nginx
|
||||
ln -svf ../init.d/nginx /etc/rc.d/rc3.d/S40nginx
|
||||
ln -svf ../init.d/nginx /etc/rc.d/rc6.d/K20nginx
|
||||
|
||||
start_service --background ${NAME}
|
||||
29
src/paks/nginx/uninstall.sh
Normal file
29
src/paks/nginx/uninstall.sh
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
############################################################################
|
||||
# #
|
||||
# This file is part of the IPFire Firewall. #
|
||||
# #
|
||||
# IPFire is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation; either version 2 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# IPFire is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with IPFire; if not, write to the Free Software #
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
# #
|
||||
# Copyright (C) 2007 IPFire-Team <info@ipfire.org>. #
|
||||
# #
|
||||
############################################################################
|
||||
#
|
||||
. /opt/pakfire/lib/functions.sh
|
||||
stop_service ${NAME}
|
||||
make_backup ${NAME}
|
||||
remove_files
|
||||
|
||||
rm -rf /etc/rc.d/rc*.d/*nginx
|
||||
26
src/paks/nginx/update.sh
Normal file
26
src/paks/nginx/update.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
############################################################################
|
||||
# #
|
||||
# This file is part of the IPFire Firewall. #
|
||||
# #
|
||||
# IPFire is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation; either version 2 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# IPFire is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with IPFire; if not, write to the Free Software #
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
# #
|
||||
# Copyright (C) 2007 IPFire-Team <info@ipfire.org>. #
|
||||
# #
|
||||
############################################################################
|
||||
#
|
||||
. /opt/pakfire/lib/functions.sh
|
||||
./uninstall.sh
|
||||
./install.sh
|
||||
Reference in New Issue
Block a user