Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script for Ubuntu 16.04 systemd #28

Open
amkgo opened this issue May 12, 2016 · 6 comments
Open

Script for Ubuntu 16.04 systemd #28

amkgo opened this issue May 12, 2016 · 6 comments

Comments

@amkgo
Copy link

amkgo commented May 12, 2016

This is for Ubuntu 14.04 upstart script. Do you have any plan to update it for Ubuntu 16.04 to use systemd script.

Thanks.
Andrew

@JasonGiedymin
Copy link
Owner

Yes absolutely LTS is on the road map.
Should have it done by end of the month.

-Jason

On May 12, 2016, at 1:42 AM, AMK [email protected] wrote:

This is for Ubuntu 14.04 upstart script. Do you have any plan to update it for Ubuntu 16.04 to use systemd script.

Thanks.
Andrew


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub

@amkgo
Copy link
Author

amkgo commented May 14, 2016

Great, thanks.

@deweydb
Copy link

deweydb commented Jun 20, 2016

+1

@cubiclesoft
Copy link

cubiclesoft commented Jun 23, 2016

Possibly related to this particular issue is that the script hangs for me on Ubuntu Server 16.04 LTS:

# /etc/init.d/nginx start
[....] Starting nginx (via systemctl): nginx.service
^C  <-- Waited for at least a minute before killing the script and yet...
# ps aux | grep nginx
root      3121  0.0  0.0  49312  3084 ?        Ss   21:22   0:00 nginx: master process /usr/local/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
www-data  3122  0.0  0.0  49312  5300 ?        S    21:22   0:00 nginx: worker process
www-data  3123  0.0  0.0  49312  5300 ?        S    21:22   0:00 nginx: worker process
# cat /etc/default/nginx
DAEMON=/usr/local/sbin/nginx
PIDSPATH=/var/run
# cat /var/run/nginx.pid
3121

On the flip side, a php-fpm init.d script I've used unchanged since Ubuntu 12.04 LTS still works great. I was using the 2009 version of this nginx init.d script, ran into the same script hanging issue, and updated to the latest version of this script in the hope that it would fix the issue. As evidenced above, it didn't.

Also of note: /etc/init.d/nginx stop does not actually stop anything. It immediately exits and says [ ok ] Stopping nginx (via systemctl): nginx.service.. service nginx stop also does nothing.

My configure line for nginx is:

./configure --pid-path=/var/run/nginx.pid --sbin-path=/usr/local/sbin --with-http_ssl_module

Nothing fancy there.

July 2016 marks the release of 16.04.1 LTS. At that point, 16.04 LTS becomes generally available to all LTS users - of which, I'd wager most are running servers. I suspect there will be a LOT more +1's on this issue shortly after that happens.

@cubiclesoft
Copy link

FYI, I switched over to this script:

https://github.com/Fleshgrinder/nginx-sysvinit-script

From an active contributor on PHP internals and an officially recognized repo from the nginx side of things. Also, the script actually works out-of-the-box (I only had to configure the pid file) on Ubuntu 16.04 LTS. I'm not a fan of running make on an init.d script, but the makefile doesn't really do much.

@mikeg-de
Copy link

I got an start up error of the nginx init script: PID file /usr/local/nginx/logs/nginx.pid not readable (yet?) after start: No such file or directory

Though, I tried modifying the init script and have configured nginx with: --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock

The script mentioned by @cubiclesoft did very well without the need of modification but I am missing the console feedback as it's given in this script on start, restart, stop etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants