[00:06] <dkorras1> hi all, can anyone please help me setup ifplugd so that it boots to eth0 and when the network cable is unplugged switch to wlan0 and vice versa
[00:09] <histo> dkorras1: http://ubuntuforums.org/showthread.php?t=1996289
[00:10] <z1haze1> ok histo: i have the new instance created and running
[00:10] <z1haze1> i created a shell script that basically backs up the entire directoy each time its ran, but i want to go the route of only backing up modified files
[00:11] <z1haze1> can you help with that?
[00:11] <_Sigma_> i have an issue with mpich2 on a cluster of ubuntu machines. am i in the right channel?
[00:11] <histo> z1haze1: you can use the --newer option of tar
[00:12] <z1haze1> i see that but it requires manual input of a date
[00:13] <z1haze1> sudo tar cvpzf myPC_ubuntu710_bu010408.tar.gz --newer '1 Apr 2008' /
[00:13] <dkorras1> hi all, can anyone please help me setup ifplugd so that it boots to eth0 and when the network cable is unplugged switch to wlan0 and vice versa
[00:14] <z1haze1> how would i do that on something automated
[00:14] <z1haze1> the modified dates need to me independent per file
[00:14] <z1haze1> some regions update daily because people play in them, some hardly ever update
[00:15] <Monotoko> dkorras1 - wait in #ubuntu for someone to help - #ubuntu-server is a bad place for desktop support
[00:15] <dkorras1> Monotoko, it'
[00:15] <dkorras1> its on a ubuntu server
[00:16] <Monotoko> my mistake... sorry I saw the same question in #ubuntu too
[00:16] <SierraAR> Using ufw, if I want to allow a specific IP address through a specific port, the correct command would be this correct? sudo ufw allow from 192.168.0.11 to 1234
[00:17] <z1haze2> anything youd change on that?
[00:17] <Monotoko> SierraAR - hm that doesn't look right to me, hang on
[00:18] <Monotoko> SierraAR: allow proto tcp from 192.168.0.11 to any port 1234
[00:19] <SierraAR> What does the proto part mean?
[00:19] <Monotoko> SierraAR - protocol... usually it defaults to TCP
[00:19] <SierraAR> Ah
[00:19] <Monotoko> but I like to specify it
[00:19] <Monotoko> I'm working on something similar to ufw for CentOS
[00:27] <z1haze2> what is this? http://paste.ubuntu.com/7718933/
[00:28] <z1haze2> can someone tell me whats wrong with this shell script please? http://paste.ubuntu.com/7718912/
[00:29] <Monotoko> z1haze2 - two things
[00:29] <Monotoko> you're using magic quotes, the ones that go to the side
[00:29] <Monotoko> rather than the regular "
[00:29] <Monotoko> and you don't have a / on the end of your directory name
[00:30] <z1haze2> ok
[00:30] <z1haze2> i copied from ftp the directory maybe thats why
[00:31] <z1haze2> and is the trailing / needed if iwant to backup the entire contents of Region
[00:31] <Monotoko> z1haze2 - you'll need a / because if you're putting them together for the tar command it'll just like like "/home/whateverfilename.tar" rather than "/home/whatever/filename.tar"
[00:31] <z1haze2> oh i gotcha
[00:31] <z1haze2> well i changed that and still this weird invalid option
[00:32] <z1haze2> http://paste.ubuntu.com/7718933/
[00:32] <z1haze2> its like a strange block
[00:32] <Monotoko> z1haze2, that'll be your funny quotation marks
[00:32] <Monotoko> did you change those to regular ascii " ?
[00:32] <z1haze2> i changed them to normal ones
[00:32] <Monotoko> paste the script again?
[00:33] <z1haze2> http://paste.ubuntu.com/7718955/
[00:34] <Monotoko> z1haze2 - I can't see anything that looks particularly funny in there, but obviously bash is tripping over something... can you put it on pastebin too?
[00:34] <z1haze2> sure
[00:35] <z1haze2> how come sometimes i have to type bash in my ommand to run shell scripts
[00:35] <z1haze2> but sometimes i dont
[00:35] <Monotoko> z1haze2 - I guess you're using UTF-8... do you mind me asking what your native language is?
[00:35] <z1haze2> im american
[00:35] <Monotoko> and it all depends on whether the file has an executable bit (chmod +x_
[00:35] <Monotoko> *(chmod +x)
[00:35] <Monotoko> ah... so you're using the standard American keyboard?
[00:35] <z1haze2> http://pastebin.com/4Wfet5cj
[00:36] <z1haze2> yep
[00:36] <z1haze2> but i didnt copy paste some
[00:36] <z1haze2> i did*
[00:36] <z1haze2> should i just paste it into notepad and change the ancii or somethingh
[00:36] <histo> use  --newer $(date +"%d %b %Y")
[00:36] <histo> z1haze2: sorry I keep getting disconnected
[00:37] <z1haze2> yea its ok histo, me too
[00:37] <Monotoko> histo - you think it's the command itself?
[00:37] <z1haze2> i dont think hes seen it yet
[00:37] <histo> Monotoko: No ignore that date thing
[00:37] <z1haze2> here we go
[00:37] <histo> That got posted when I came back in, it was a response from a question he asked way back
[00:37] <Monotoko> jesus fuck
[00:37] <histo> ignore it
[00:38] <IdleOne> watch the language please
[00:38] <z1haze2> its split like 4 times in 15 minutes
[00:38] <Monotoko> sorry - they're really annoying me now, not sure who would DDoS freenode of all places
[00:39] <Monotoko> z1haze2 - my advice would be to try to save it as ascii
[00:39] <Monotoko> worst that can happen is you have to retype it
[00:39] <histo> well I filter joins, parts, quits, and nicks so I can't see all that.
[00:39] <z1haze2> yea im gonna do that now i guess
[00:41] <histo> z1haze2: also you may want preserve as a tar option in your script.
[00:42] <histo> z1haze2: like --preserve-permissions  since youdon't appear to be using -p
[00:42] <z1haze2> ok what now, how do i preserve the same permissions
[00:42] <Monotoko> z1haze2 - you'll also want a --
[00:42] <Monotoko> with create etc
[00:42] <z1haze2> and gzip and filename?
[00:42] <Monotoko> yeah
[00:43] <Monotoko> because those are the long ways of saying -czf
[00:43] <histo> z1haze2: your --create --blah  could be -czpf  instead
[00:43] <z1haze2> alright
[00:43] <histo> z1haze2: those are just the long way...
[00:43] <Monotoko> sorry, I just cracked open my manual now, didn't see you were using one - instead of two :P
[00:43] <z1haze2> i see
[00:44] <histo> z1haze2: if you man tar   you could see all the options if your curious later
[00:44] <z1haze2> ok i have it almost ready
[00:44] <z1haze2> except the -f
[00:44] <z1haze2> is that for filename?
[00:44] <Monotoko> yeah
[00:44] <z1haze2> how would i write it?
[00:44] <z1haze2> -czpf=$DESTDIR$FILENAME $SRCDIR
[00:44] <z1haze2> ?
[00:44] <Monotoko> -czpf filename
[00:45] <Monotoko> no =
[00:45] <z1haze2> oh ok
[00:45] <z1haze2> it will just know
[00:45] <Monotoko> tar is quite old... it knows what comes after is the filename
[00:45] <Monotoko> much like bash
[00:45] <z1haze2> i ran it as a test
[00:45] <z1haze2> and got tar: Removing leading `/' from member names
[00:46] <Monotoko> don't worry
[00:46] <Monotoko> that should be okay
[00:46] <Monotoko> you might want to echo the variables out
[00:46] <Monotoko> to see what it's removing from where
[00:46] <z1haze2> ok it worked i got what i needed
[00:46] <z1haze2> now the automate it every hour WHEN the server is running the process
[00:46] <z1haze2> and i really have no idea how to do that
[00:46] <z1haze2> i did get the crontab thing tho
[00:48] <z1haze2> histo: i ran 0 * * * * sudo /home/z1haze/7dtdPVEbackups.sh in the crontab
[00:48] <z1haze2> but that do it hourly right?
[00:48] <Monotoko> z1haze2 - don't know if histo will have d/ced
[00:48] <Monotoko> but yeah
[00:48] <Monotoko> that will work
[00:48] <Monotoko> however
[00:48] <Monotoko> you'll want to su to root
[00:48] <Monotoko> and add it to root's crontab
[00:49] <Monotoko> rather than your own
[00:49] <z1haze2> i did
[00:49] <z1haze2> oh wait
[00:49] <Monotoko> you don't technically need sudo then
[00:49] <z1haze2> there is not root
[00:49] <z1haze2> i have root disabled
[00:49] <Monotoko> you should be able to run "sudo -i"
[00:49] <Monotoko> which should give you a root prompt
[00:49] <z1haze2> oh ok
[00:49] <z1haze2> so enter that enter roots contrab?
[00:50] <Monotoko> yeah
[00:50] <Monotoko> the reason for that
[00:50] <Monotoko> is sudo asks for your password
[00:50] <Monotoko> and obviously you won't be around to enter it ;)
[00:50] <z1haze2> oh dur i didnt think that
[00:50] <z1haze2> weird
[00:50] <z1haze2> i just checked the roots crontab
[00:50] <z1haze2> and thats what i was already using
[00:50] <z1haze2> maybe cause i did sudo crontab -e?
[00:50] <Monotoko> ah yeah, that would make sense
[00:51] <Monotoko> just drop sudo from the command in crontab then
[00:51] <z1haze2> how do i get back to my name? just su myname?
[00:51] <Monotoko> "exit"
[00:51] <z1haze2> cool
[00:51] <z1haze2> ok i dunno if u were around for the earlier discussion, this whole idea is for backing up region files for a game
[00:52] <z1haze2> but the gasme is still in alpha so there are like no server commands or any sort of administration system
[00:52] <z1haze2> my hope is to just make these backups, then if someone gets their base broken into i can find the time and just roll back the region files for that area
[00:52] <Monotoko> I don't think I will have been... and yeah, that should work
[00:52] <z1haze2> but theres complications now
[00:53] <z1haze2> 1, this crontab will run regardless whether the server is online or not.. which is gonna just waste space
[00:53] <z1haze2> secondly, is there away to only backup new and files modified like after the last backup
[00:53] <z1haze2> if that makes any sense
[00:54] <z1haze2> like say only region 2.1 file was modified since the last backup, we dont need to backup all 100 files, we just need to backup that 1
[00:54] <Monotoko> hm... for 2, I'd look into rsync
[00:55] <Monotoko> so you'd rsync the files from [here] to [there] then tar them up [there] (or not tar them up... entirely depends how big they are)
[00:55] <Monotoko> for 1... how do you mean "online"?
[00:56] <z1haze2> well its a gameserver, so the process isnt always online
[00:56] <z1haze2> sometimes i take it down for maint, or just if i want to lave it down for the weekend to promote something else,
[00:56] <Monotoko> well... is there any way you can add a check into the script?
[00:56] <z1haze2> thats what i was kinda asking u, i didnt know if there was a way to add a logic statement to check processes
[00:57] <Monotoko> not sure about processes in bash scripts...
[00:57] <z1haze2> like if (process=running){do backup}else{do nothing
[00:57] <Monotoko> but you could create a file
[00:57] <Monotoko> when the script is running
[00:58] <Monotoko> ah!
[00:58] <Monotoko> I've found something nice
[00:58] <z1haze2> yay
[00:58] <Monotoko> http://pastebin.com/yPG98Tq3
[00:59] <z1haze2> hmm what is this for
[00:59] <Monotoko> of course it all depends on what your service is called... if it's a web game, you might put it into maint mode but Apache might still be running
[01:00] <z1haze2> i have a script that will check the status
[01:00] <Monotoko> can you pastebin that script?
[01:01] <z1haze2> sur 1 sec
[01:01] <histo> Monotoko: you'd have to pass the service as an argument
[01:01] <histo> ps with grep would probably be better
[01:02] <histo> z1haze2: how do you launch the game server?
[01:02] <z1haze2> how do i select all in putty
[01:02] <z1haze2> with a shell script
[01:02] <Monotoko> z1haze2 - just run your mouse over it
[01:02] <histo> z1haze2: what server is it?
[01:02] <z1haze2> 7days to die
[01:02] <Monotoko> ... woah de-ja-vu
[01:02] <z1haze2> http://paste.ubuntu.com/7719036/
[01:02] <histo> z1haze2: what does the script call when it runs?
[01:03] <z1haze2> ^ shell script
[01:03] <z1haze2> prolly need common too
[01:03] <z1haze2> 1 sec
[01:04] <histo> z1haze2: yeah
[01:04] <histo> paste common.h
[01:04] <z1haze2> ok this script is more than i can select in 1 window
[01:04] <z1haze2> is there a way to select all text even when its out of site
[01:04] <Monotoko> z1haze2, two secs
[01:04] <z1haze2> sight*
[01:04] <Monotoko> let me get you something
[01:04] <Monotoko> I've been using this for a while
[01:04] <histo> sudo apt-get install pastebinit && pastebinit /usr/local/lib/7dtd/common.sh
[01:04] <z1haze2> i have pastebinit
[01:04] <z1haze2> didnt even think of it
[01:05] <Monotoko> does that still work>
[01:05] <Monotoko> it didn't last time I tried it
[01:05] <Monotoko> :(
[01:05] <z1haze2> http://paste.ubuntu.com/7719045/
[01:05] <z1haze2> yea i use it sometimes
[01:07] <histo> Monotoko: that's silly with sed why not just grep
[01:07] <Monotoko> histo, what's that sorry?
[01:08] <histo> z1haze2: even that script checks the pid to see if its there.
[01:09] <z1haze2> isnt that what its supposed to do
[01:10] <histo> ps -a | grep 7dtd   compare the output of that if it's null then the server isn't running.
[01:11] <z1haze2> how can i do that though
[01:11] <z1haze2> i only know like some simple java
[01:11] <z1haze2> and from what i see syntax isnt close to the same
[01:12] <Monotoko> z1haze2 - two secs
[01:12] <Monotoko> http://pastebin.com/MuU9uUzz
[01:13] <z1haze2> so do i put that in my backupscript?
[01:13] <Monotoko> z1haze2 - kind of
[01:13] <Monotoko> you want your backup bits to go between line 6 and line 8
[01:14] <Monotoko> basically so it only runs them when the server is running
[01:14] <z1haze2> replace running?
[01:14] <Monotoko> yeah
[01:14] <histo> and change line 5 to exit
[01:14] <z1haze2> gotcha
[01:14] <Monotoko> histo, look at me, I used grep ;)
[01:18] <z1haze2> http://pastebin.com/LM1L5hRm like this?
[01:19] <Monotoko> z1haze2 - looks good to me
[01:19] <Monotoko> might want to test it somewhere
[01:19] <z1haze2> yea ill test it
[01:19] <z1haze2> but u know what this wont work
[01:19] <z1haze2> there are instances of the server
[01:19] <z1haze2> like server1, server2
[01:20] <histo> hrm.. that won't work
[01:20] <z1haze2> can u see anything in the common.sh that would show how to find a specific instance
[01:20] <Monotoko> ah... then yeah, they would all have to be down
[01:21] <histo> neither variant works with sed or grep there is something wrong with the test
[01:24] <histo> how about simplifying
[01:25] <histo> if ps -a | grep -v grep | grep 7dtd > /dev/null; then bbackup commands; else exit; fi
[01:26] <z1haze2> 1 sec have to reboot the machine
[01:27] <histo> kk
[01:27] <z1haze2> the nget the other game servers back going should only be a min
[01:31] <histo> your going to ge tteh time wiht colons in your filename using that
[01:34] <z1haze2> ok back
[01:35] <histo> z1haze2: http://pastebin.com/0R65xEUN
[01:36] <histo> z1haze2: now you just have to add a part about seeing how many backups are there and deleting old ones
[01:36] <z1haze2> yep haha
[01:36] <z1haze2> well
[01:36] <z1haze2> minus the checking for the instance thing
[01:36] <z1haze2> cause im gonna make backsup shell scripts for each instnace
[01:36] <z1haze2> and add it to crontab
[01:37] <z1haze2> 7dtdPVEbackups.sh: line 4: unexpected EOF while looking for matching `)'
[01:37] <z1haze2> 7dtdPVEbackups.sh: line 11: syntax error: unexpected end of file
[01:37] <histo> z1haze2: you could if ls $DESTDIR | wc -l  is greater than some number rm a few
[01:38] <whitepowder> So, i've gotten my little preseeded install usb stick working, but when i run the full-upgrade at the end, i'd like to save the debs downloaded (/target/var/cache/apt/archives/) Is there a good way to do this? I'd like to put them into the /pool tree on the usb stick -- When are they deleted even?
[01:38] <z1haze2> histo that paste didnt work
[01:38] <z1haze2> http://pastebin.com/GezaN84J
[01:39] <histo> z1haze2: which script are you running?
[01:39] <z1haze2> the last one u just posted
[01:39] <histo> z1haze2: hold on let me look for typo
[01:43] <z1haze2> histo i just thought of a way to isolate the instances
[01:44] <z1haze2> is there a way to isoloate the directory the grep is searching for the 7dtd pid?
[01:44] <z1haze2> because i just noticed that when you start the server for a specific instance it puts a 7dtd.pid file in the /instances/ directory
[01:45] <histo> z1haze2: pastebin your script
[01:46] <z1haze2> http://paste.ubuntu.com/7719170/
[01:47] <histo> z1haze2: ahh error is on line 4 forgot the )
[01:47] <tarvid> cacti installed with ease on my 14.04 workstation, the apache alias did not get installed on my 12.04 server, can I just copy the conf-availalbe/cacti.conf file
[01:47] <histo> z1haze2: $(date............').tgz
[01:48] <histo> z1haze2: that part
[01:48] <z1haze2> oh isee
[01:48] <z1haze2> so anyways back to my latest discovery
[01:48] <z1haze2> is there a way to search for 7dtd.pid in a specific directory for this script we have made
[01:48] <z1haze2> because it generates that pid file when the server is up
[01:49] <z1haze2> and its gone when its down
[01:49] <histo> z1haze2: http://paste.ubuntu.com/7719172/
[01:50] <z1haze2> i fixed that part did u chane anything else?
[01:50] <histo> z1haze2: yeah got rid of the ; and moved them down a line just for sanity
[01:51] <histo> s/them/then/
[01:52] <histo> z1haze2: you'd have to see where the common.h stores the pid's
[01:52] <histo> z1haze2: I can't remember
[01:52] <z1haze2> haha umessed up the ') again
[01:52] <z1haze2> i know where it stores them
[01:52] <z1haze2> in the isntance folder of that instance
[01:52] <z1haze2> so for like instance pvp it will be in /instances/pvp/7dtd.pid
[01:53] <histo> no I didn't
[01:53] <histo> Oh yeah i did
[01:54] <histo> lol
[01:54] <z1haze2> hmm
[01:54] <z1haze2> its not working
[01:54] <z1haze2> the check thing
[01:54] <z1haze2> the syntax isfine
[01:54] <z1haze2> but it just backing up when its online
[01:54] <histo> z1haze2: well the grep check see's if there is a process running with the name 7dtd
[01:55] <histo> z1haze2: I thought you wanted to backup when it was running and not when it is off
[01:55] <z1haze2> lets search for file 7dtd.pid in/home/sdtd/instances/TGC-PVE
[01:55] <histo> k
[01:55] <z1haze2> because that file is only there when the server is online
[01:55] <z1haze2> yes ur are correct backup while its running, do nothing if offline
[01:56] <histo> z1haze2: if [ -f /path/to/somefile ]    then blah blah else blah blah fi
[01:57] <z1haze2> literally like that? if [ -f /home/sdtd/instances/TGC-PVP/7dtd.pid ] ?
[01:57] <z1haze2> whre the logical statement in that
[01:58] <histo> z1haze2: yeah if file blah blah exists
[01:58] <z1haze2> whats makes it say if exists though
[01:58] <histo> z1haze2: -f is to check if the file is there.
[01:58] <z1haze2> oh
[01:58] <histo> if the file isn't it will elese
[01:58] <histo> else
[01:59] <histo> z1haze2: to keep with your variable theme you could add a INSTANCE at the top for the path
[01:59] <z1haze2> ah yea
[01:59] <histo> it's up to you though.
[01:59] <z1haze2> no its good thinkin, cleaner
[02:00] <z1haze2> and in linux we use [ ] for logical statements?
[02:01] <histo> z1haze2: bash not linux
[02:01] <z1haze2> http://paste.ubuntu.com/7719227/ whatcha think
[02:02] <histo> z1haze2: looks good if it's running it will backup else exit
[02:02] <z1haze2> ok yep it just backed up once let me turn it off and see
[02:03] <histo> z1haze2: []  is a test in bash
[02:03] <z1haze2> oh ok
[02:04] <z1haze2> great it worked
[02:04] <z1haze2> i think im gonna change it to like 6 hours
[02:04] <z1haze2> how would i do that with the 0 * * * *  thing
[02:05] <z1haze2> like 0 6 * * * /home/z1haze/7dtdPVEbackups.sh ?
[02:06] <histo> 0 */6 * * *
[02:06] <histo> or 0 0,6,12,18 * * *
[02:06] <histo> either way
[02:06] <z1haze2> 0 */6 * * * /home/z1haze/7dtdPVEbackups.sh
[02:06] <histo> z1haze2: yeah looks good,  it will email you output also
[02:07] <z1haze2> now i wont have to worry quite so much about filling up my drive
[02:07] <z1haze2> how do iset the email though? ive never set it
[02:07] <histo> z1haze2: do you have a mail server running on this box?
[02:07] <z1haze2> nope
[02:07] <z1haze2> :)
[02:07] <histo> then it won't email you.
[02:07] <z1haze2> haha
[02:07] <z1haze2> mailservers are a pain
[02:07] <z1haze2> every time ive ever made one it always sends to junk mail
[02:07] <z1haze2> so i just use mailgun
[02:08] <Patrickdk> well, mailservers are a lot of work
[02:08] <histo> well you only need a sending server so something like ssmtp would do the trick.  then you just add a MAILTO=whomever@example.com in your crontab
[02:08] <z1haze2> yea im not that talented to do all that
[02:08] <Patrickdk> unless you have preconfigured examples and done it several times
[02:08] <Patrickdk> expect it to take a week
[02:08] <z1haze2> im somewhat ok at doing websites but thats where it ends
[02:09] <z1haze2> do you play any games
[02:09] <histo> You don't need a full blown mailserver. I'd use something like ssmtp or esmtp or one of the other ones
[02:09] <z1haze2> i dont know what those are, is it something easy to do
[02:09] <Patrickdk> !nullmailer
[02:09] <Patrickdk> stupid bot
[02:09] <z1haze2> haha
[02:09] <z1haze2> .nullmailer
[02:10] <z1haze2> some bots are ! and some are . right?
[02:10] <histo> z1haze2: yeah it's just a text file to configure with those and you can have them use a gmail address to send out mail
[02:10] <Patrickdk> it doesn't have an entry for it is the issue
[02:16] <z1haze> well thank you so much for your help
[02:17] <z1haze> i achieved my goal this evening thanks to you
[02:17] <histo> z1haze: np and no I don't play any games
[02:17] <z1haze> now i just have to create a new script for the other instances, iull jhust cp it
[02:17] <histo> z1haze: well you learned a lot also
[02:17] <z1haze> i did
[02:17] <z1haze> i could definitely do this now
[02:17] <z1haze> but its just all so new to me
[02:19] <z1haze> how histo
[02:20] <z1haze> hey*
[02:20] <z1haze> i know it all works good as of now; but i kinda wanna perfect is
[02:21] <z1haze> i want to keep a weeks worth of backups
[02:21] <z1haze> so 28 files, how could we make it delete backups starting with the oldest once we hit 28
[02:49] <z1haze> where can i read what sh -c means in a bash script
[02:50] <histo> z1haze: let me think about the easiest way to do that.
[02:50] <z1haze> well histo i figured out the backup deletion
[02:51] <z1haze> well i had help but i put the pieces together
[02:51] <histo> z1haze: ahh cool what are you using?
[02:51] <histo> wc -l ?
[02:51] <z1haze> sh -c "cd $DESTDIR && ls -t | tail -n +29 | xargs rm"
[02:51] <histo> ahh very nice
[02:51] <z1haze> can you explain it to me haha
[02:52] <histo> z1haze: well you can change teh beginning to ls -t $DESTDIR | tail -n +29 ....
[02:52] <z1haze> i tried that
[02:52] <z1haze> it wasnt able to delete the files
[02:52] <histo> z1haze: how were you trying it?  It should work
[02:52] <z1haze> rm: cannot remove `backup-2014-06-28-220402.tgz': No such file or directory
[02:52] <z1haze> it wasnt in the directory
[02:53] <z1haze> so the shell wasnt in the right place
[02:53] <z1haze> the code that some guy gave me worked
[02:53] <z1haze> i just didnt really understand it
[02:53] <z1haze> he says it opens a new shell and runs that command, but it doesnt effect anything else after that
[02:53] <histo> z1haze: I don't see why the sh is necessary let me try a test real quick
[02:54] <z1haze> ok
[02:54] <z1haze> we have to get the shell into the right directory before it exectutes rm
[02:56] <histo> oh yeah you need the full path from ls
[02:56] <histo> that's why
[02:56] <z1haze> so is this way ok? or would u change it
[02:57] <histo> it will work the way it is, i'm just trying to think of a different way to explain it to you.
[03:04] <histo> you could ls -d -t $PWD/*  but that will confuse you more
[03:11] <z1haze> heh
[03:11] <z1haze> well i know pwd is current directory
[03:11] <histo> z1haze: so basically the way you have it now you are running cd and ls -t in a shell. Then you are piping the output to tail  to get the last entries and piping that to xargs to rm the ones above 29
[03:12] <z1haze> right
[03:12] <z1haze> i get the concept kinda
[03:13] <z1haze> what are all the xargs for
[03:13] <histo> xargs just passes what you give it to the specified command
[03:13] <histo> so it's taking the output of the tail and passing it to rm
[03:14] <histo> z1haze: So the reason you got the error before is because originally your ls -t was only happening in the directory where they script was run.  That's why it needed the cd
[03:14] <z1haze> right
[03:16] <histo> z1haze: to get it without the sh  you'd have to use a function
[03:16] <histo> z1haze: after each command the subshell exits in bash script.
[03:17] <z1haze> im gonna stick with it haha
[03:18] <histo> actually you could just cd $BACKDIR && ls -t .....    should work without the sh
[03:19] <histo> but with the sh is more appropriate then when that line is done it goes back tot eh directory that the script was run from.
[03:19] <histo> glad you got it all working though
[03:43] <histo> what is with freenode tonight
[03:46] <No_one_at_all> Hi, question: fsck is set to run once every 6 months on our server. It last ran last December, and I would swear before we updated to 14.04 that it was scheduled for June this year. But I just checked it, and it is set for July 14, and what's more, it says the last check was run in January of /this/ year. What gives?
[03:54] <Patrickdk> your clock was set wrong
[03:54] <Patrickdk> or your have a bad memory
[03:55] <Patrickdk> there was never a reason why it would have run?
[03:56] <Patrickdk> like the machine crashed or was powered down uncleanly?
[04:06] <histo> No_one_at_all: how are you scheduling it?
[04:06] <No_one_at_all> histo: i'm not, it's doing it automatically
[04:06] <cfhowlett> No_one_at_all I would guess a clock localization setting
[04:06] <histo> No_one_at_all: then how is it "set to run every 6 months" ?
[04:07] <Patrickdk> histo, filesystem default
[04:07] <histo> ahh
[04:07] <Patrickdk> you have never used ext[234]?
[04:07] <histo> on reboot you mean?
[04:07] <Patrickdk> no, on boot
[04:08] <histo> yeah
[04:08] <histo> I was going to say fs has to be un mounted
[04:08] <Patrickdk> no
[04:08] <histo> o'rly?
[04:08] <Patrickdk> it's always done the checks with it mounted read-only
[04:09] <histo> Why would it mount ro to fsck?
[04:09] <histo> on boot?
[04:09] <Patrickdk> so you can boot?
[04:09] <histo> it's not mounted ro to boot
[04:09] <Patrickdk> yes it is
[04:09] <Patrickdk> it's mounted read only, then fsck starts, and when it finishes it remounts rw
[04:14] <histo> Why would it do that?
[04:16] <Patrickdk> how does it know what filesystems it needs to check? if it can't read /etc/fstab?
[04:16] <Patrickdk> but beyond that not sure
[04:16] <Patrickdk> it was long long ago, it was changed from premount, to reonly mount
[04:16] <Patrickdk> long before ubuntu was started it was done that way
[04:16] <histo> silliness
[05:00] <No_one_at_all> Well, I have no idea what caused this, but I forced an fsck anyway since we were expecting the downtime, and i guess all's well that ends well.
[05:00] <No_one_at_all> >_<
[05:01] <No_one_at_all> date's right
[06:00] <histo> No_one_at_all: you can check with tune2fs  when the next one is scheduled
[06:01] <histo> No_one_at_all: it probably fsck'd because of mount count
[06:13] <No_one_at_all> histo: yeah, I'm aware of how to check for it (now), after the debacle we had last June
[06:14] <No_one_at_all> and it fsck'd because of the date, not number of mounts/unmounts. This thing gets rebooted once every month and a half
[06:14] <No_one_at_all> if that
[09:21] <lordievader> Good morning.
[09:26] <ophkilter> o/
[09:27] <lordievader> Hey ophkilter, how are you?
[09:28] <ophkilter> rebooting
[09:28] <ophkilter> one sec
[09:28] <ophkilter> i'm good
[15:52] <xpistos> clear
[15:54] <xpistos> Is there some bug in 14.04 server 64bit that it won't reboot? I try to use sudo reboot now and it just goes back to a prompt
[16:04] <dkorras> hi all, please can you help me. I am at my wits end here. To setup my ubuntu machine automatica LAN and WLAN switch with ifplugd, i have tried all the configurations I can find but nothing seems to work
[17:54] <DeadxBeat> Hey all, in just installed ubuntu server with ssh and lamp and i set a static ip. I was able to access apache via the ip but then i updated the hostname in /etc/hosts and /etc/hostname and rebooted and now i am unable to access apache via ip. What did i do wrong?
[17:58] <DeadxBeat> Anyone? =/
[18:03] <DeadxBeat> aye
[18:03] <Xethron> DeadxBeat: Did you change your apache config?
[18:04] <Xethron> Or only your hosts?
[18:04] <DeadxBeat> just my /etc/hosts and /etc/hostname
[18:04] <Xethron> Pastebin please?
[18:04] <DeadxBeat> only thing i added to /etc/hosts was xx.xx.xx.xx mydomain.com mydomain and to /etc/hostname is just mydomain
[18:07] <DeadxBeat> I took a look around the apache configs but i can't find anything that has to do with the hostname
[18:08] <Xethron> DeadxBeat: did you leave localhost intact?
[18:08] <DeadxBeat> yes
[18:09] <Xethron> DeadxBeat: and xx.xx.xx.xx is a valid IP address?
[18:10] <DeadxBeat> Yes, its the static ip i've assigned in /etc/network/interfaces
[18:10] <DeadxBeat> i can ping the machine via the ip address and it has internet access
[18:11] <DeadxBeat> Its not on my local network because its a static ip assigned by the ISP
[18:15] <DeadxBeat> is it necessary for my hostname to match my domain name?
[18:48] <zartoosh> Hi I am trying to automate installation of trusty using preseeding. My system can boots in UEFI mode, the iso image which I make does not take the preseed value if I boot in UEFI mode. What am I missing? thx
[21:55] <bitbyte> does any one know if on ubuntu server the encrypted LVM is mounted over LUKS ?
[22:01] <bitbyte> by the way my version is Ubuntu 14.04 LTS (GNU/Linux 3.13.0-29-generic x86_64)
[22:02] <TJ-> bitbyte: how do you mean by 'over'? As in, raw device --> LUKS --> LVM ?
[22:03] <bitbyte> well im currently trying to figure out how the bootloaer is mounting my encrypted LVM and wheter it uses LUKS
[22:04] <TJ-> bitbyte: Standard install always uses LUKS
[22:04] <bitbyte> im basically trying to put a key file on my boot partion so I can tell LUKS that the keyfile is on boot so i can reboot my server remotely without needing to be infront of it.
[22:06] <TJ-> bitbyte: that's kind of insecure, storing the key in /boot/ - may as well not encrypt
[22:06] <TJ-> bitbyte: have you thought about remote ssh key provision?
[22:07] <bitbyte> it’s a home server to be fair, but im working remotely for next few months so trying to make it so can perform reboots when needed
[22:07] <TJ-> How about: http://www.debian-administration.org/article/579/Unlocking_a_LUKS_encrypted_root_partition_via_ssh
[22:07] <bitbyte> not herd of ssh key provision but im doing this from external of the network
[22:08] <bitbyte> im currently following this http://askubuntu.com/questions/59487/how-to-configure-lvm-luks-to-autodecrypt-partition
[22:08] <TJ-> You can reverse the concept and have the server contact the key server, of course
[23:22] <Kawaiola> Hey guys whats an easy way to get drivers for ubuntu server my ethernet card says it isn't managed and it gets to the internet but I can't set it static
[23:23] <TJ-> Kawaiola: It sounds like you're confusing concepts. What reports the ethernet card is not managed?
[23:26] <Kawaiola> TJ-, Well I installed the user interface to my server and the top right corner where the connections mananger is says that and it won't let me click them
[23:26] <TJ-> Ahhhh... I thought as much :) "unmanaged" simply means that Network Manager isn't managing the connection, and that is likely because it's configuration is in "/etc/network/interfaces"
[23:28] <Kawaiola> TJ-, Ahh so I will have to set the server static command line anyways is what you are saying haha