[packages/nginx/dev-dynamic: 2/2] update paths in files

glen glen at pld-linux.org
Wed Oct 19 20:38:03 CEST 2016


commit 61cffbcc17a9f881d5dd5da161fdc875f150465b
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Wed Oct 19 21:34:19 2016 +0300

    update paths in files

 nginx.conf      |  8 ++++----
 nginx.init      | 10 +++++-----
 nginx.logrotate | 13 +------------
 nginx.monitrc   | 18 +++++++++---------
 nginx.service   | 10 +++++-----
 5 files changed, 24 insertions(+), 35 deletions(-)
---
diff --git a/nginx.conf b/nginx.conf
index 25a6809..ad34fa2 100644
--- a/nginx.conf
+++ b/nginx.conf
@@ -1,6 +1,6 @@
 user			nginx nginx;
-error_log		/var/log/nginx/nginx- at type@_error.log;
-pid			/var/run/nginx- at type@.pid;
+error_log		/var/log/nginx/error.log;
+pid			/var/run/nginx.pid;
 
 events {
 	worker_connections	2048;
@@ -14,7 +14,7 @@ http {
 	log_format	main	'$remote_addr - $remote_user [$time_local] $request '
 				'"$status" $body_bytes_sent "$http_referer" '
 				'"$http_user_agent" "$http_x_forwarded_for"';
-	access_log	/var/log/nginx/nginx- at type@_access.log	main;
+	access_log	/var/log/nginx/access.log	main;
 
 	server {
 		listen		80;
@@ -51,7 +51,7 @@ http {
 		#ssl_trusted_certificate /etc/nginx/ca.crt;
 
 		server_name	localhost;
-		access_log	/var/log/nginx/nginx- at type@_access.log main;
+		access_log	/var/log/nginx/access.log main;
 
 		location / {
 			autoindex	on;
diff --git a/nginx.init b/nginx.init
index cc334ab..ef12b57 100755
--- a/nginx.init
+++ b/nginx.init
@@ -5,9 +5,9 @@
 # chkconfig:	345 85 15
 # description:  Nginx is an HTTP(S) server, HTTP(S) reverse \
 #               proxy and IMAP/POP3 proxy server
-# processname:	nginx- at type@
-# pidfile:	/var/run/nginx- at type@.pid
-# config:	/etc/nginx/nginx- at type@.conf
+# processname:	nginx
+# pidfile:	/var/run/nginx.pid
+# config:	/etc/nginx/nginx.conf
 
 # Source function library
 . /etc/rc.d/init.d/functions
@@ -15,8 +15,8 @@
 # Source networking configuration.
 . /etc/sysconfig/network
 
-nginx="/usr/sbin/nginx- at type@"
-svname="nginx (@type@)"
+nginx="/usr/sbin/nginx"
+svname="nginx"
 prog=${nginx##*/}
 
 sysconfig="/etc/sysconfig/$prog"
diff --git a/nginx.logrotate b/nginx.logrotate
index c1404da..605955c 100644
--- a/nginx.logrotate
+++ b/nginx.logrotate
@@ -3,17 +3,6 @@
 	create 644 nginx nginx
 	sharedscripts
 	postrotate
-		if [ -x /etc/rc.d/init.d/nginx-light ] ; then
-			/sbin/service nginx-light reopen-logs > /dev/null
-		fi
-		if [ -x /etc/rc.d/init.d/nginx-standard ] ; then
-			/sbin/service nginx-standard reopen-logs > /dev/null
-		fi
-		if [ -x /etc/rc.d/init.d/nginx-mail ] ; then
-			/sbin/service nginx-mail reopen-logs > /dev/null
-		fi
-		if [ -x /etc/rc.d/init.d/nginx-perl ] ; then
-			/sbin/service nginx-perl reopen-logs > /dev/null
-		fi
+		/sbin/service nginx reopen-logs > /dev/null
 	endscript
 }
diff --git a/nginx.monitrc b/nginx.monitrc
index a6cb644..2c7d573 100644
--- a/nginx.monitrc
+++ b/nginx.monitrc
@@ -1,7 +1,7 @@
-check process nginx-standard with pidfile /var/run/nginx-standard.pid
+check process nginx with pidfile /var/run/nginx.pid
 	group www
-	start program = "/etc/rc.d/init.d/nginx-standard start"
-	stop program = "/etc/rc.d/init.d/nginx-standard stop"
+	start program = "/etc/rc.d/init.d/nginx start"
+	stop program = "/etc/rc.d/init.d/nginx stop"
 	if failed url http://localhost/ timeout 10 seconds then restart
 #	if failed host 192.168.1.1 port 443 type TCPSSL
 #		certmd5 12-34-56-78-90-AB-CD-EF-12-34-56-78-90-AB-CD-EF
@@ -9,10 +9,10 @@ check process nginx-standard with pidfile /var/run/nginx-standard.pid
 	if 5 restarts within 5 cycles then timeout
 #	alert root at localhost
 #	alert 123456 at sms on { timeout }
-	depends on nginx-standard_bin
-	depends on nginx-standard_rc
+	depends on nginx_bin
+	depends on nginx_rc
 
-check file nginx-standard_bin with path /usr/sbin/nginx-standard
+check file nginx_bin with path /usr/sbin/nginx
 	group nginx
 	if failed checksum then unmonitor
 	if failed permission 755 then unmonitor
@@ -20,7 +20,7 @@ check file nginx-standard_bin with path /usr/sbin/nginx-standard
 	if failed gid root then unmonitor
 #	alert root at localhost
 
-check file nginx-standard_rc with path /etc/rc.d/init.d/nginx-standard
+check file nginx_rc with path /etc/rc.d/init.d/nginx
 	group nginx
 	if failed checksum then unmonitor
 	if failed permission 754 then unmonitor
@@ -28,6 +28,6 @@ check file nginx-standard_rc with path /etc/rc.d/init.d/nginx-standard
 	if failed gid root then unmonitor
 #	alert root at localhost
 
-check file nginx-stanard.conf path /etc/nginx/nginx-standard.conf
+check file nginx-stanard.conf path /etc/nginx/nginx.conf
 	if changed sha1 checksum 
-	then exec "/etc/init.d/nginx-standard graceful"
+	then exec "/etc/rc.d/init.d/nginx graceful"
diff --git a/nginx.service b/nginx.service
index 2ab5453..e1100d1 100644
--- a/nginx.service
+++ b/nginx.service
@@ -4,11 +4,11 @@ After=syslog.target network.target remote-fs.target nss-lookup.target
 
 [Service]
 Type=forking
-PIDFile=/var/run/nginx-standard.pid
-ExecStartPre=/usr/sbin/nginx-standard -c /etc/nginx/nginx-standard.conf -t
-ExecStart=/usr/sbin/nginx-standard -c /etc/nginx/nginx-standard.conf
-ExecReload=/usr/sbin/nginx-standard -c /etc/nginx/nginx-standard.conf -s reload
-ExecStop=/usr/sbin/nginx-standard -c /etc/nginx/nginx-standard.conf -s stop
+PIDFile=/var/run/nginx.pid
+ExecStartPre=/usr/sbin/nginx -c /etc/nginx/nginx.conf -t
+ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf
+ExecReload=/usr/sbin/nginx -c /etc/nginx/nginx.conf -s reload
+ExecStop=/usr/sbin/nginx -c /etc/nginx/nginx.conf -s stop
 
 [Install]
 WantedBy=multi-user.target
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nginx.git/commitdiff/61cffbcc17a9f881d5dd5da161fdc875f150465b



More information about the pld-cvs-commit mailing list