diff options
author | Michał Masłowski <mtjm@mtjm.eu> | 2013-02-23 10:32:13 +0100 |
---|---|---|
committer | Michał Masłowski <mtjm@mtjm.eu> | 2013-02-23 10:32:13 +0100 |
commit | cc98017bbad1f9abb4fd76c68a158f356926a164 (patch) | |
tree | 1c3bb2e1c6bf899d35d5b7f58e798a4d9d63e1d1 /community/nginx | |
parent | 40ee6ff3cb6c8b9b90e75463ce9dc37bdcd0d79b (diff) | |
parent | c8c918cb8c810e3300e5165f9af7ca8ab9650a59 (diff) |
Merge branch 'master' of ssh://parabolagnulinux.org:1863/home/parabola/abslibre-pre-mips64el
Conflicts:
community/freeimage/PKGBUILD
extra/php/PKGBUILD
Diffstat (limited to 'community/nginx')
-rw-r--r-- | community/nginx/PKGBUILD | 19 | ||||
-rw-r--r-- | community/nginx/logrotate (renamed from community/nginx/nginx.logrotate) | 3 | ||||
-rw-r--r-- | community/nginx/nginx.install | 8 | ||||
-rw-r--r-- | community/nginx/rc.d | 68 |
4 files changed, 17 insertions, 81 deletions
diff --git a/community/nginx/PKGBUILD b/community/nginx/PKGBUILD index 448fab964..15f2a549b 100644 --- a/community/nginx/PKGBUILD +++ b/community/nginx/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 84198 2013-02-13 14:43:00Z bpiotrowski $ +# $Id: PKGBUILD 84707 2013-02-22 20:47:11Z bpiotrowski $ # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> # Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl> # Contributor: Miroslaw Szot <mss@czlug.icis.pcz.pl> @@ -8,7 +8,7 @@ _tmpdir=/var/lib/nginx pkgname=nginx pkgver=1.2.7 -pkgrel=1 +pkgrel=2 pkgdesc='Lightweight HTTP server and IMAP/POP3 proxy server' arch=('i686' 'x86_64' 'mips64el') depends=('pcre' 'zlib' 'openssl' 'geoip') @@ -27,13 +27,11 @@ backup=(${_cfgdir:1}/fastcgi.conf ${_cfgdir:1}/win-utf etc/logrotate.d/nginx) source=(http://nginx.org/download/nginx-$pkgver.tar.gz - rc.d service - nginx.logrotate) + logrotate) sha256sums=('2457a878943fb409ec4fcb46b43af222d06a584f93228e17a4f02b0e7bfc9de3' - '4f6bd31d684956ca143f7dc68dbd3caa67e835fb84dc44d1a94217b9214c6cfd' '77da8ce4d8378048606a25e09270ee187d6b226ee750b6cb4313af5549f5156a' - '613b0ed3fe4b5ee505ddb5122ee41604f464a5049be81c97601ee93970763a23') + 'b0ef6c00e0e94926588242ed910b387922e513d5152fcdb651dc06e2b84e7d85') build() { cd "$srcdir"/$pkgname-$pkgver @@ -80,9 +78,6 @@ package() { cd "$srcdir"/$pkgname-$pkgver make DESTDIR="$pkgdir" install - install -d "$pkgdir"/etc/logrotate.d - install -m644 "$srcdir"/nginx.logrotate "$pkgdir"/etc/logrotate.d/nginx - sed -e 's|\<user\s\+\w\+;|user html;|g' \ -e '44s|html|/usr/share/nginx/html|' \ -e '54s|html|/usr/share/nginx/html|' \ @@ -94,9 +89,9 @@ package() { install -d "$pkgdir"/usr/share/nginx mv "$pkgdir"/etc/nginx/html/ "$pkgdir"/usr/share/nginx - - install -D -m755 "$srcdir"/rc.d "$pkgdir"/etc/rc.d/nginx + + install -Dm644 "$srcdir"/logrotate "$pkgdir"/etc/logrotate.d/nginx install -Dm644 "$srcdir"/service "$pkgdir"/usr/lib/systemd/system/nginx.service - install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/nginx/LICENSE + install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/nginx/LICENSE rm -rf "$pkgdir"/var/run } diff --git a/community/nginx/nginx.logrotate b/community/nginx/logrotate index d490d5d9b..8773578b5 100644 --- a/community/nginx/nginx.logrotate +++ b/community/nginx/logrotate @@ -1,5 +1,6 @@ -/var/log/nginx/*.log { +/var/log/nginx/*log { missingok + create 750 root log sharedscripts compress postrotate diff --git a/community/nginx/nginx.install b/community/nginx/nginx.install index b31ee41d7..00a7b9cac 100644 --- a/community/nginx/nginx.install +++ b/community/nginx/nginx.install @@ -1,4 +1,12 @@ +post_install() { + if [[ -e var/log/nginx ]]; then + chmod 750 var/log/nginx + chown root:log var/log/nginx + fi +} + post_upgrade() { + [[ $(vercmp $2 1.2.7-1) -le 0 ]] && post_install if [[ $(vercmp $2 1.2.1-2) -le 0 ]]; then echo " >>> Since 1.2.1-2 several changes has been made in package:" echo " - *.conf files have been moved to /etc/nginx" diff --git a/community/nginx/rc.d b/community/nginx/rc.d deleted file mode 100644 index eb9031e81..000000000 --- a/community/nginx/rc.d +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash - -. /etc/rc.conf -. /etc/rc.d/functions - -function check_config { - stat_busy "Checking nginx configuration" - /usr/sbin/nginx -t -q -c /etc/nginx/nginx.conf - if [ $? -ne 0 ]; then - stat_die - else - stat_done - fi -} - -case "$1" in - start) - check_config - $0 careless_start - ;; - careless_start) - stat_busy "Starting nginx" - if [ -s /var/run/nginx.pid ]; then - stat_fail - # probably ;) - stat_busy "Nginx is already running" - stat_die - fi - /usr/sbin/nginx -c /etc/nginx/nginx.conf &>/dev/null - if [ $? -ne 0 ]; then - stat_fail - else - add_daemon nginx - stat_done - fi - ;; - stop) - stat_busy "Stopping nginx" - PID=$(cat /var/run/nginx.pid) - kill -QUIT $PID &>/dev/null - if [ $? -ne 0 ]; then - stat_fail - else - for i in {1..10}; do - [ -d /proc/$PID ] || { stat_done; rm_daemon nginx; exit 0; } - sleep 1 - done - stat_fail - fi - ;; - restart) - check_config - $0 stop - sleep 1 - $0 careless_start - ;; - reload) - check_config - if [ -s /var/run/nginx.pid ]; then - status "Reloading nginx configuration" kill -HUP $(cat /var/run/nginx.pid) - fi - ;; - check) - check_config - ;; - *) - echo "usage: $0 {start|stop|restart|reload|check|careless_start}" -esac |