Hello,
When I run the following command from my macbook to my ubuntu server the terminal does not get released. It just sits there until I Control-C the command.
ssh user@my-server 'sudo /etc/init.d/nginx start'
When i login and then run the command everything works fine.
ssh user@my-server
sudo /etc/init.d/nginx start
Here is the output highlighting the issue
~ $ ssh [email protected]
[email protected]'s password:
Last login: Mon Sep 6 15:18:18 2010 from
me@somewhere:~$ sudo /etc/init.d/nginx restart
[sudo] password for me:
Restarting nginx daemon: nginx.
me@somewhere:~$ exit
logout
Connection to somewhere.com closed.
~ $ ssh [email protected] 'sudo /etc/init.d/nginx restart'
[email protected]'s password:
[sudo] password for me:
Restarting nginx daemon: nginx.
After the last command executes it just holds there and does nothing. Thanks in advance for any advice you might have.
me@somewhere:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.04
DISTRIB_CODENAME=hardy
DISTRIB_DESCRIPTION="Ubuntu 8.04.4 LTS"
me@somewhere:~$
Update:
I thought the init script might have a bug in it too. I have since used 3 different versions of an init script for niginx and all 3 have had the same issue. I am currently running this script which seems to be the pick of the 3 I found.
http://wiki.nginx.org/Nginx-init-ubuntu
I just tried the command suggested in the comments, and the issue is exactly the same. Any other ideas?