Skip to content

Instantly share code, notes, and snippets.

@ngsw
Created January 31, 2012 20:39
Show Gist options
  • Save ngsw/1712762 to your computer and use it in GitHub Desktop.
Save ngsw/1712762 to your computer and use it in GitHub Desktop.
--- nginx.yum-org 2011-12-16 00:22:28.000000000 +0900
+++ nginx 2012-02-01 04:10:39.447206296 +0900
@@ -6,7 +6,7 @@
# processname: nginx
# config: /etc/nginx/nginx.conf
# config: /etc/sysconfig/nginx
-# pidfile: /var/run/nginx.pid
+# pidfile: /var/run/nginx/nginx.pid
# description: nginx is a HTTP and reverse proxy server
#
### BEGIN INIT INFO
@@ -28,10 +28,10 @@
fi
prog=nginx
-nginx=${NGINX-/usr/sbin/nginx}
+nginx=${NGINX-/usr/local/nginx/sbin/nginx}
conffile=${CONFFILE-/etc/nginx/nginx.conf}
lockfile=${LOCKFILE-/var/lock/subsys/nginx}
-pidfile=${PIDFILE-/var/run/nginx.pid}
+pidfile=${PIDFILE-/var/run/nginx/nginx.pid}
SLEEPMSEC=100000
RETVAL=0
@ngsw
Copy link
Author

ngsw commented Jan 31, 2012

@ngsw
Copy link
Author

ngsw commented Jan 31, 2012

yum install nginx

cp -a /etc/init.d/nginx /bkup/path/to/nginx

yum remove nginx

cp -a /bkup/path/to/nginx{.yum-org,}

vim /bkup/path/to/nginx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment