=== marrusl is now known as marrusl_afk === marrusl_afk is now known as marrusl [07:44] http://paste.pound-python.org/show/5215/ [07:44] What is wrong with that script? [07:45] I want an ssh tunnel to start, everytime my computer connects to a network. [07:45] Since my chrome, pidgin, and everything else is setup with ssh tunneling/localhost socks proxy [07:48] Hi, I am currently creating upstart scripts for the batch queueing system gridengine. [07:48] The pre-start script needs NFS directories to be present, so I have [07:48] start on (local-filesystems and remote-filesystems and net-device-up IFACE!=lo) [07:48] and yet my /tmp/my-log output shows /vol/local/bin/register_sge.sh: No such file or directory [07:48] Script is on http://pastebin.com/QKnP8neJ anything obvious I missed ? [07:58] sneumann: You know more about upstart than I do, what's wrong with my script? [08:01] what's the error ? [08:01] starting too early ? [08:01] It just keeps restarting. [08:02] I'm not sure why, I don't know how to debug it.. or I can't find the log. [08:02] remove the respawn for now, enable it once it works [08:02] I guess it is started too early, namely before networking to mybox can happen [08:03] try my http://pastebin.com/QKnP8neJ line exec > /tmp/my-log 2>&1 [08:03] Any Canonical people there ? [08:03] upstart.canonical.com is down [08:05] I see, so gridengine is how you debug? [08:05] no thats a batch system, debugging is via sending stdout/stderr to /tmp/my-log [12:27] about upstart.canonical.com being down: there is upstart.at now [12:28] would be nice if the old site would refer to that though... [12:32] JohnTeddy: first of all, the /etc/init/*.conf files are not scripts but configuration files ;) [12:32] also, what is the post-start script supposed to do? [12:45] and how does ssh login work? [13:25] JanC: I am in Shanghai.. so I can't visit facebook, youtube, twitter, and a large selection of other websites. [13:25] So everytime I login, I type that ssh command. It forms an ssh tunnel to a remote server in California I own (the company owns). So chrome and pidgin are setup to use localhost:1080 as a socks proxy. So I can visit whatever websites I want, and not worry about certain things being blocked, or being snooped on. [13:26] The annoying this is typing that command a few times a day. [13:26] Each time I move my laptop, say from one office to another. Or sometimes the great Chinese firewall will kill off my ssh tunnel, so I have to start it again. [13:27] I'd li ke upstart to type this ssh command, as soon as I connect to the network, either over WiFi0 or eth0. I don't know anything about upstart, or programming in general.. so I'm struggling. [13:28] do you need to type any password when connecting with ssh ? [13:28] no, I have sftp'd my ssh DSA certificate to the remote server in remote:/home/me/.ssh/known_hosts [13:28] So if I do 'ssh john@remote', I just get a shell with no password prompt. [13:29] so you haven't encrypted your private key... [13:30] okay, now one problem is that upstart runs ssh as root, and root probably doesn't have a private key that you uploaded... [13:30] mmm, my disk is encrypted. [13:31] I am using cryptsetup, so when I boot my system.. busybox pops up.. and asks for a key before my large file system can be mounted (which included .ssh). [13:31] So I don't believe my private key is easily accessible, and is not shared with anyone. [13:31] JanC: hmm, I see. [13:31] I don't want to run ssh as root anyway, that seems like a bad idea. [13:32] Can I just manually do 'su john; ssh blah blah;'? [13:33] you can do su -c "ssh blah blah" john [13:37] I think you also shouldn't use the -f option [13:38] because when it forks to the background, upstart will probably think it exits [13:39] I see. [13:39] JanC: So besides those changes, the script should work? [13:39] I googled for this ping command, it seemslike a better condition to be met, relative to the interface starting up. [13:40] like I said, it's not a script but a configuration file ;) [13:41] JohnTeddy: the problem is that it gets run *after* ssh [13:42] so if you have no connection, ssh will always be run [13:43] and it will probably fail because early during boot there is no connection, exit with an error, get restarted by upstart, repeat until there is a connection--then you test if there is a connection [13:47] so it should be a pre-start script really [13:47] and it's probably better to make "start on" depend on a network device comming up [15:53] hi, I am still trying to create an upstart job for the gridengine daemon, facing two problems: [15:54] 1) my job is not executed upon booting [15:54] 2) service gridengine stop simply hangs, and I don't know what it is waiting for. [15:55] The job is started with "expect fork", but I also tried "expect daemon" [15:56] Any clues ? The full script is at http://pastebin.com/QKnP8neJ [15:57] I tried "start on (startup and remote-filesystems)" but it is not triggered [22:22] it strikes me that the Upstart documentation is sorely missing the page from the Make documentation that explains that there are really two separate syntaxes in the files [22:22] upstart and shell [22:24] heh [22:25] or that they are configuration files that contain snippets of shell code ;) [22:27] A lot of people do seem to talk about Upstart “scripts”. That might indicate they have the wrong impression of the semantics of the job definitions. [22:29] indeed [22:30] Of course, nothing would prevent a very similar syntax that is in fact a DSL in a scripting language. [22:37] you can say that about HTML too ;) [22:37] of course [22:38] (html (head (title "foo") (script (on-click 'foo (alert "bar")))) (body (h1 "o hai") (p (id 'foo) "quux"))) [22:39] Web scripting in the same language as the markup of content, anyone? :-P [22:40] Mozilla configuration files are sort of JavaScript scripts too ;) [22:41] Mozilla/Firefox/etc. [22:41] or were (maybe not anymore nowadays that they have SQLite?) [22:42] prefs.js still exists. === robbiew is now known as robbiew_