aboutsummaryrefslogtreecommitdiffstats
path: root/main/nginx
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-10-28 11:03:06 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-10-28 12:07:25 +0000
commitc5b7fe019808ce1a437895a65816f8d2b13ec79d (patch)
tree8581a4b2a7f1effbe99ca383b37158017a58afc9 /main/nginx
parent71f74b583df0e1be3189e91c3e19ff58c975dea7 (diff)
downloadaports-c5b7fe019808ce1a437895a65816f8d2b13ec79d.tar.bz2
aports-c5b7fe019808ce1a437895a65816f8d2b13ec79d.tar.xz
main/nginx: create and use an nginx user and www-data group
ref #2245
Diffstat (limited to 'main/nginx')
-rw-r--r--main/nginx/APKBUILD7
-rw-r--r--main/nginx/nginx.pre-install8
l---------main/nginx/nginx.pre-upgrade1
3 files changed, 11 insertions, 5 deletions
diff --git a/main/nginx/APKBUILD b/main/nginx/APKBUILD
index 3668897e55..578b1f12f2 100644
--- a/main/nginx/APKBUILD
+++ b/main/nginx/APKBUILD
@@ -4,11 +4,12 @@
pkgname=nginx
pkgver=1.4.3
-pkgrel=0
+pkgrel=1
pkgdesc="lightweight HTTP and reverse proxy server"
url="http://www.nginx.org"
arch="all"
license="Custom"
+install="$pkgname.pre-install $pkgname.pre-upgrade"
makedepends="pcre-dev openssl-dev zlib-dev"
source="http://nginx.org/download/$pkgname-$pkgver.tar.gz
nginx.initd
@@ -36,8 +37,8 @@ build() {
--http-client-body-temp-path=/tmp/$pkgname/client-body \
--http-proxy-temp-path=/tmp/$pkgname/proxy \
--http-fastcgi-temp-path=/tmp/$pkgname/fastcgi \
- --user=http \
- --group=http \
+ --user=nginx \
+ --group=nginx \
--with-ipv6 \
--with-pcre-jit \
--with-http_ssl_module \
diff --git a/main/nginx/nginx.pre-install b/main/nginx/nginx.pre-install
index 8d0a58c6f8..55b5bfcda5 100644
--- a/main/nginx/nginx.pre-install
+++ b/main/nginx/nginx.pre-install
@@ -1,5 +1,9 @@
#!/bin/sh
-addgroup nginx 2>/dev/null
-adduser -S -H -h /dev/null -s /sbin/nologin -D -G nginx nginx 2>/dev/null
+addgroup -g 82 -S www-data 2>/dev/null
+addgroup -S nginx 2>/dev/null
+adduser -S -G nginx -H -h /var/www/localhost/htdocs -s /sbin/nologin \
+ -D nginx 2>/dev/null
+addgroup nginx www-data 2>/dev/null
+
exit 0
diff --git a/main/nginx/nginx.pre-upgrade b/main/nginx/nginx.pre-upgrade
new file mode 120000
index 0000000000..7af104a12c
--- /dev/null
+++ b/main/nginx/nginx.pre-upgrade
@@ -0,0 +1 @@
+nginx.pre-install \ No newline at end of file