/srv/irclogs.ubuntu.com/2011/11/29/#ubuntu-ie.txt

tdr112morning all09:59
tdr112how would one find the ful path to a command eg touch10:00
ebelwhich10:02
ebelor type10:02
ebelactually "type $COMMANDNAME" is better because it works on shell bultins etc.10:03
ebel"which" will return just the path so it's handy if you want to use it in scripts10:03
ebele.g. "ls -l $(which vim)" will tell you the size & perms etc of the vim command10:04
ebelCan also be used to tell you the deb package that a programme is in:10:05
ebeldpkg -S $(which pv)10:05
ebelThis is Unix, you should know this.10:05
ebel</jurassic-park>10:07
tdr112thanks ebel10:15
tdr112hey guys whats the best way to debug a cron job10:29
slashtommystdout and stderr from a cron job should be sent to root's mailbox by default10:34
slashtommyor whichever user is setup as a the alias for root (/etc/aliases)10:35
ebelor put the output (stdout & atderr) to a file and look at it10:45
ebelYou can use "env" command to print the current environment variables.10:45
ebeland look in the log file, where it starts the cron, you can see if the cron is running or not10:46
tdr112i have pit stdout and err to a file and getting stuff now10:46
ebelenvironmental variables & PATHs & user account are usually the things that mess up crons10:46
tdr112i think i have fixed it10:47
tdr112ebel: that what it was forgot to change to the pull path for one of them10:47
ebelah full paths10:55
ebelin python you can standardise paths with os.path.abspath()10:55
ebelYou can do it on the command line with `realpath`10:55
ebeltis always good to sanitise input data from the user ASAP10:56
davemdon't forget file permissions, chances are cron isn't running as your user/the user you think11:05
tdr112ok cron is runn when i tell it do */5 for every 5 min but not when i set a time11:35
tdr112could the cron user be using a different time setting11:35
ebelthat question doesn't make sens11:37
ebelwhat "time string" are you using?11:38
ebelAFAIK cron is run as root, it just can run certain lines as a a different user11:38
ebelOnly root is God. Only root can change to a different user. Sometimes root will, through the power of sudo & setuids, allow other users to change to other user accounts, but they do that by becoming one with root, then moving to another user11:41
ebelamen11:41
tdr112i am running it as root11:42
tdr112so if i set the cron job to run every 5 min using the following */5 * * * * ls11:43
tdr112it runs11:43
tdr112but not 45 11 * * * ls11:43
slashtommyit's not 11.45 yet11:43
tdr112yep11:44
tdr112that was just an eg11:44
slashtommy45 11 * * *     root    /bin/ls11:44
ebel'root' might not be needed. depends if you're using "crontab -e". /etc/crontab, etc.11:45
tdr112i am using sudo crontab -e11:45
ebel"root" is not needed then11:45
* ebel is unsure, that line looks ok...11:46
tdr112ok found it12:01
tdr112timezone12:01
tdr112its always time zones12:01
tdr112root had a different time zone set than my user12:01
tdr112thank you all for you help12:01
ebelhahah12:06
ebelalways always use UTC12:06
ebeli don't really know much of changing server's timezones, I didn't think different users had different timezones.12:06
ebelthought it was all the one server time12:06
ebeltdr112: use ntp to keep your clocks up to day12:06
ebel*date12:06
dumb1224Hi I recently noticed that turning on 'smooth scrolling' on firefox is not much better13:27
dumb1224is such a feature implemented in firefox or gtk+ and so on?13:28
Chat3619Hi room16:09
ebelhello Chat361916:10
slashtommyhey BenChapman16:37
BenChapmanHey slashtommy :)16:45
=== delcoyote_ is now known as delcoyote
slashtommyBenChapman: how you finding life in town?17:08
tdr112has anyone setup a vpn server on ubuntu17:16
slashtommywhat kind of VPN?17:20
tdr112i am not too sure17:23
tdr112just been told me need one asap for a 3rd party17:23
slashtommywhat equipment are you supporting?17:23
tdr112just reading up on them now , finding out do a need a router or is it some thing i do on a server17:24
slashtommya server can be a router17:24
slashtommyand in fact, making it a VPN server - you usually add a tun or tap interface, thereby making your server multihomed, therefore making it into a router17:25
tdr112hmm, it sounds hard17:27
slashtommyopenvpn is pretty easy to setup, a couple of hours17:28
slashtommyit uses key based authentication, so very convenient if you're connecting devices (rather than people with their laptops)17:29
slashtommyif you're wanting to provide a VPN for remote workers, you may be better off with buying an off-the-shelf router to do that17:29
slashtommythe cost would be much cheaper than your time17:30
slashtommyanyway, it's home time17:30
BenChapmanslashtommy: great :) Really enjoying being central17:54
BenChapmanno major issues with noise as-yet... but I wasn't there saturday night17:54
czajkowskihttp://www.youtube.com/watch?v=ZKBpYwuk1Uw18:59
slashtommyczajkowski: what's the story?19:16
czajkowskias of now I'm coming19:16
czajkowskibut that may change on thursday19:16
czajkowskisorry I cant confirm either way19:16
slashtommyoh19:17
slashtommywe can plan for friday night :)19:18
slashtommyor rather, what's the plan?19:18

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!