FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 07-07-2010, 07:56 PM
xf mail
 
Default Upstart script not starting on boot

Hi everyone,

First time writing a startup script in Ubuntu and I'm having some trouble. I'm having an issue with a custom init (upstart) script. Basically the script should start on boot and establish an ssh connection to a remote proxy. Unfortunately the script is not working as intended and does not automatically establish the connection at boot time.


A query of "sudo initctl list" shows the script in the "stopped/waiting" state just after boot. Below is the contents of the /etc/init/sshproxy.conf file:

Code:
----------------

# sshproxy

#
# This service maintains an ssh connection to the proxy
# server. If the connection breaks it will be automatically re-established.

# start on started rcS
# start on runlevel [2345]
# start on started ssh

start on started networking
# start on started network-interface-security
# start on stopped rc RUNLEVEL=[2345]


respawn
exec /usr/bin/ssh -n -N -T -R 10001:localhost:22 user@proxy


--------------


I am running 10.04. As you can see I have tried a number of "start on" directives with none of them working as intended.

I've done all the set up with SSH, shared the keys etc, so the actual connection works. If I run the script manually with "sudo start sshproxy" the connection is established and all is well. However, that's not what I want to do, this should start and establish the connection automatically on boot.


Reading this (http://upstart.ubuntu.com/getting-started.html) lead me to believe that this was all the configuration I needed, however the script still does not start on boot. I know I am missing something fairly obvious but I'm a bit stuck...


Is there another place / file I need to configure to actually get this to start on boot?

Thanks for any help you can send my way.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 05:33 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org