Nice work Christopher and Andrew, thanks for sharing it. I'm
On May 20, 2:33 am, "W. Andrew Loe III" <
and...@andrewloe.com> wrote:
> Macports has some handy plists for using loadctl, I just piggy back
> off those. Just make sure you set daemon off; in your nginx.conf since
> daemondo wraps the nginx process as a daemon.
>
> # nginx short cuts
> alias start_nginx='sudo launchctl load -w
> /Library/LaunchDaemons/org.macports.nginx.plist'
> alias stop_nginx='sudo launchctl unload -w
> /Library/LaunchDaemons/org.macports.nginx.plist'
> alias restart_nginx='sudo launchctl unload -w
> /Library/LaunchDaemons/org.macports.nginx.plist; sudo launchctl load
> -w /Library/LaunchDaemons/org.macports.nginx.plist'
>
> This handily makes nginx persistently on(or off) across restarts.
>
> On Tue, May 19, 2009 at 2:33 PM, Christopher Bailey
>
> <
ch...@cobaltedge.com> wrote:
> > I just set up aliases, and use the PID file, such as:
> > alias startnginx='sudo /opt/nginx/sbin/nginx'
> > alias stopnginx='sudo kill `cat /opt/nginx/logs/nginx.pid `'
> > alias restartnginx='stopnginx; startnginx'