nginx: new line
This commit is contained in:
parent
4b2ddfef00
commit
0d21ff227d
@ -24,13 +24,13 @@ depends="
|
|||||||
wget
|
wget
|
||||||
linux-headers
|
linux-headers
|
||||||
sudo
|
sudo
|
||||||
|
g++
|
||||||
"
|
"
|
||||||
makedepends="
|
makedepends="
|
||||||
mercurial
|
mercurial
|
||||||
cmake
|
cmake
|
||||||
make
|
make
|
||||||
git
|
git
|
||||||
g++
|
|
||||||
build-base
|
build-base
|
||||||
autoconf
|
autoconf
|
||||||
automake
|
automake
|
||||||
@ -59,7 +59,7 @@ package() {
|
|||||||
|
|
||||||
cp -r "$srcdir"/usr/* "$pkgdir"/usr
|
cp -r "$srcdir"/usr/* "$pkgdir"/usr
|
||||||
|
|
||||||
install -D -m 755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
|
install -D -m 755 "$srcdir"/nginx.initd "$pkgdir"/etc/init.d/nginx
|
||||||
install -d -m 755 "$pkgdir"/var/log/nginx
|
install -d -m 755 "$pkgdir"/var/log/nginx
|
||||||
chown $pkgusers:$_grp_ngx "$pkgdir"/var/log/nginx
|
chown $pkgusers:$_grp_ngx "$pkgdir"/var/log/nginx
|
||||||
}
|
}
|
68
minoplhy-nginx-vanilla/APKBUILD
Normal file
68
minoplhy-nginx-vanilla/APKBUILD
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
# Contributor: Minoplhy <c@3qx.nl>
|
||||||
|
maintainer="Minoplhy <c@3qx.nl>"
|
||||||
|
pkgname=minoplhy-nginx-vanilla
|
||||||
|
pkgver=1.27.4
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="Nginx"
|
||||||
|
url="https://github.com/minoplhy/deployment"
|
||||||
|
arch="x86_64"
|
||||||
|
license="MIT"
|
||||||
|
depends="
|
||||||
|
libunwind
|
||||||
|
pcre-dev
|
||||||
|
zlib-dev
|
||||||
|
libxslt-dev
|
||||||
|
gd-dev
|
||||||
|
openssl-dev
|
||||||
|
perl-dev
|
||||||
|
geoip-dev
|
||||||
|
curl-dev
|
||||||
|
lmdb-dev
|
||||||
|
libxml2-dev
|
||||||
|
yajl-dev
|
||||||
|
pkgconf
|
||||||
|
wget
|
||||||
|
linux-headers
|
||||||
|
sudo
|
||||||
|
g++
|
||||||
|
"
|
||||||
|
makedepends="
|
||||||
|
mercurial
|
||||||
|
cmake
|
||||||
|
make
|
||||||
|
git
|
||||||
|
build-base
|
||||||
|
autoconf
|
||||||
|
automake
|
||||||
|
libtool
|
||||||
|
ninja
|
||||||
|
"
|
||||||
|
pkgusers="nginx"
|
||||||
|
_grp_ngx="nginx"
|
||||||
|
_grp_www="www-data"
|
||||||
|
pkggroups="$_grp_ngx $_grp_www"
|
||||||
|
install="$pkgname.pre-install"
|
||||||
|
subpackages="$pkgname-openrc
|
||||||
|
"
|
||||||
|
source="$pkgname-$pkgver.tar.gz::https://github.com/minoplhy/deployment/releases/download/alpine-nginx-release-$pkgver/alpine-nginx-release-$pkgver-vanilla.tar.gz
|
||||||
|
nginx.initd
|
||||||
|
"
|
||||||
|
options="net !check" # check: no test suite
|
||||||
|
|
||||||
|
package() {
|
||||||
|
install -D -m 755 "$srcdir"/home/runner/nginx_scriptbox/nginx/objs/nginx "$pkgdir"/usr/sbin/nginx
|
||||||
|
chown root:root "$pkgdir"/usr/sbin/nginx
|
||||||
|
|
||||||
|
install -d -m 755 "$pkgdir"/lib/nginx/modules
|
||||||
|
install -D -m 755 "$srcdir"/home/runner/nginx_scriptbox/nginx/objs/*.so "$pkgdir"/lib/nginx/modules
|
||||||
|
chown -R root:root "$pkgdir"/lib/nginx/modules
|
||||||
|
|
||||||
|
install -D -m 755 "$srcdir"/nginx.initd "$pkgdir"/etc/init.d/nginx
|
||||||
|
install -d -m 755 "$pkgdir"/var/log/nginx
|
||||||
|
chown $pkgusers:$_grp_ngx "$pkgdir"/var/log/nginx
|
||||||
|
}
|
||||||
|
|
||||||
|
sha512sums="
|
||||||
|
b8c9e7d55b512dbcb19892bb1ea9a6705d53fea17871ea888f7c93d4da077fa63b2676b6aac675d236a81eaf7ae55bb48ca27d0042c38498f5d1061452b1c9fd minoplhy-nginx-vanilla-1.27.4.tar.gz
|
||||||
|
6f696579f2c3958d9d9c0c23e9e69e51344851aa15d29f4983a4d2feb493ac950fd6150f4a3cddc96a125261ae3cb69545fdb46218e8ab085c6c894b17b4a9a4 nginx.initd
|
||||||
|
"
|
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
addgroup -Sg 82 www-data 2>/dev/null
|
||||||
|
addgroup -S nginx 2>/dev/null
|
||||||
|
adduser -S -D -H -h /var/www -s /sbin/nologin -G nginx -g nginx nginx 2>/dev/null
|
||||||
|
addgroup nginx www-data 2>/dev/null
|
||||||
|
|
||||||
|
exit 0
|
71
minoplhy-nginx-vanilla/nginx.initd
Normal file
71
minoplhy-nginx-vanilla/nginx.initd
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
#!/sbin/openrc-run
|
||||||
|
|
||||||
|
description="Nginx http and reverse proxy server"
|
||||||
|
extra_commands="checkconfig"
|
||||||
|
extra_started_commands="reload reopen upgrade"
|
||||||
|
|
||||||
|
cfgfile=${cfgfile:-/etc/nginx/nginx.conf}
|
||||||
|
pidfile=/run/nginx.pid
|
||||||
|
command=${command:-/usr/sbin/nginx}
|
||||||
|
command_args="-c $cfgfile"
|
||||||
|
required_files="$cfgfile"
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
need net
|
||||||
|
use dns logger netmount
|
||||||
|
}
|
||||||
|
|
||||||
|
start_pre() {
|
||||||
|
checkpath --directory --owner www-data:www-data ${pidfile%/*}
|
||||||
|
$command $command_args -t -q
|
||||||
|
}
|
||||||
|
|
||||||
|
checkconfig() {
|
||||||
|
ebegin "Checking $RC_SVCNAME configuration"
|
||||||
|
start_pre
|
||||||
|
eend $?
|
||||||
|
}
|
||||||
|
|
||||||
|
reload() {
|
||||||
|
ebegin "Reloading $RC_SVCNAME configuration"
|
||||||
|
start_pre && start-stop-daemon --signal HUP --pidfile $pidfile
|
||||||
|
eend $?
|
||||||
|
}
|
||||||
|
|
||||||
|
reopen() {
|
||||||
|
ebegin "Reopening $RC_SVCNAME log files"
|
||||||
|
start-stop-daemon --signal USR1 --pidfile $pidfile
|
||||||
|
eend $?
|
||||||
|
}
|
||||||
|
|
||||||
|
upgrade() {
|
||||||
|
start_pre || return 1
|
||||||
|
|
||||||
|
ebegin "Upgrading $RC_SVCNAME binary"
|
||||||
|
|
||||||
|
einfo "Sending USR2 to old binary"
|
||||||
|
start-stop-daemon --signal USR2 --pidfile $pidfile
|
||||||
|
|
||||||
|
einfo "Sleeping 3 seconds before pid-files checking"
|
||||||
|
sleep 3
|
||||||
|
|
||||||
|
if [ ! -f $pidfile.oldbin ]; then
|
||||||
|
eerror "File with old pid ($pidfile.oldbin) not found"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f $pidfile ]; then
|
||||||
|
eerror "New binary failed to start"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
einfo "Sleeping 3 seconds before WINCH"
|
||||||
|
sleep 3 ; start-stop-daemon --signal 28 --pidfile $pidfile.oldbin
|
||||||
|
|
||||||
|
einfo "Sending QUIT to old binary"
|
||||||
|
start-stop-daemon --signal QUIT --pidfile $pidfile.oldbin
|
||||||
|
|
||||||
|
einfo "Upgrade completed"
|
||||||
|
|
||||||
|
eend $? "Upgrade failed"
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user