/srv/irclogs.ubuntu.com/2018/02/13/#ubuntu-mate.txt

hellowarhi01:27
kernalhi01:27
hellowarhow its work this channel ? its used for ?01:27
kernalTopic for #ubuntu-mate is: Home of Ubuntu MATE | https://ubuntu-mate.org/ | Community https://ubuntu-mate.community/ | Donate https://ubuntu-mate.org/donate/ | IRC Logs http://irclogs.ubuntu.com/01:28
=== hellowar is now known as HelloWar
mate|19370hello, i'm looking for help. i'm not receiving email confirmation emails01:51
kernalhello01:51
kernalsounds like an email isssue01:51
mate|19370hi01:51
kernalnot really a ubuntu mate issue01:52
mate|19370I've checke01:52
mate|19370i've checked my mailbox it worked; i can receive test emails..01:53
kernalalright, how is your email linked to a problem with ubuntu mate?01:54
kernalwho is your email provider?01:55
mate|19370i'm trying to signup with the ubuntu-mate community (through the website).01:57
mate|19370What is the support email address for the ubuntu-mate community?01:57
mate|19370i have my own email-domain (with webhoster).01:59
mate|19370thanks for responding!02:00
kernalI'm just signing up now myself02:00
kernaland I just received an email02:01
kernal"Welcome to Ubuntu MATE Community!02:01
kernalClick the following link to confirm and activate your new account:"02:01
kernalit was very quick to receive the activation email02:01
mate|19370Thank you. i'll try again tomorrow. This link email has yet to arrive for me after several attempts.02:05
mate|19370bye.. bedtim02:05
Boyettehi03:29
kernalhi03:29
Boyettewow there are really ppl alive here03:30
kernal:P03:30
Boyettedidnt even know this still existed03:30
Boyettethis whole irc thing03:30
Boyettebut its alive and kicking03:30
kernalstill existed??? It never left03:31
Boyetteapparently03:31
Boyetteim stuck on some cron problem it must be very simple but i cant fix it03:33
Boyettei was hoping to find some living soul who can enlighten me03:33
kernali don't normally tell dad jokes, but when i do he laughs03:34
Boyettethat sounds like alive03:34
kernalshoot03:35
kernalalthough, I'm still rather new with ubuntu03:36
Boyettei have crontab setup to run 4 times a sh script a day03:36
Boyettescript 1 compiles a file03:36
Boyettescript 2 ftp's the file to another server03:36
Boyettescript 3= scipt 103:36
Boyettescript 4 = script 203:36
Boyettescript 1 and 3 runs fine03:36
Boyettescript 2 and 4 never run however crontab does compile a logfile which is always empty03:37
Boyettebut is touched at the right time03:37
Boyettesyslog reports:03:37
kernalusing sftp to transfer the file?03:37
BoyetteCRON [2340] (root) CMD (bash /root/ftp.sh  >> root/cronjobs1.log)03:38
BoyetteCRON info NO MTA installed, discarding output)03:38
Boyetteif i run the ftp.sh manually it runs fine03:38
Boyettebut if cron has to do it automated it is just not doing anything03:39
Boyettebut i cant find a clue why03:39
kernalhave you used the full path names? that has caught me out before03:39
Boyettethe pathnames must be correct03:39
Boyetteftp.sh is in the same directory03:40
kernallike /home/$USER/some/folder  |  not just some/folder03:40
Boyetteas makethefuckingfile.sh03:40
TechmanSo, is anyone in here running the 18.04 dailies?03:40
Boyetteand makethefuckingfile.sh does work03:40
Boyettethats me mr techman03:40
TechmanI kinda wanna check out the progress with the dash menu and stuff with MATE03:40
Boyetteim on mate 18,0403:40
kernal@Techman, no 18.04 for me yet03:40
TechmanNot sure if it's stable enough to look on with a liveusb03:40
Boyetteits very stable03:41
TechmanI know wimpy was saying a few weeks ago that stuff was being moved around a lot03:41
Boyetteonly mesa is not03:41
Boyettebut this problem i have btw is not on mate 18,04 but 1603:41
TechmanOh, don't mind me03:41
Boyettewell matepanel gets fuckeed up sometimes03:41
TechmanI just asked a question without watching what the previous conversation was03:41
Boyetteyes03:41
* Techman goes back to idling03:41
Boyettei was asking some help with my cron sh problem03:42
Boyettedid u get me mr. kernal?03:42
Boyetteif path was incorrect script2 would also not run03:43
kernalhttps://askubuntu.com/questions/23009/why-crontab-scripts-are-not-working03:45
Boyettepermission problems03:46
Boyettei have looked into that03:46
Boyettechmod 75503:46
Boyettechmod +x03:46
kernalsorry bud, still a lot to learn myself03:46
Boyettehehe ok03:47
Boyetteits actually a common problem03:47
kernalgot a pastebin of the script?03:47
Boyetteprobably03:47
Boyettethe ftp script?03:47
kernalyeah03:47
Boyettejust a moment03:48
Boyetteneed to copy from the server03:48
Boyette#!/bin/sh03:50
BoyetteHOST='ftp.server.com'03:50
BoyettePORT='21'03:50
BoyetteUSER='email@domain.com03:50
BoyettePASSWORD='xxxxxxxxxx'03:50
BoyetteFILE='xxx.xml'03:50
Boyetteftp -n $HOST $PORT <<END_SCRIPT03:50
Boyettequote USER $USER03:50
Boyettequote PASS $PASSWORD03:50
Boyetteput $FILE03:50
Boyettequit03:50
BoyetteEND_SCRIPT03:50
Boyetteexit 003:50
Boyettebut that runs well if i run it manually03:50
kernaltry changing the file path03:51
kernalthat's what I meant about full paths03:51
Boyettethe file path in cron ?03:51
kernalin the script03:51
kernalFILE='xxx.xml'03:51
Boyettethe file is in the same directory as the ftp.sh03:51
kernalput in the full path03:51
kernalI know, but in cron it likes to have the full path03:52
kernal????03:52
Boyettei think its not the file because cron would log that and it doesnt make sense that the script itself runs fine but not if cron does that03:52
Boyettein cron the full path to the ftp.sh is there03:52
kernalthis has caught me out before with some shell scripts that run on cronjobs03:52
Boyetteit doesnt need to know a path to a file in the script because cron is starting the script not executing the actual ftp transaction03:52
Boyettei can however do it03:53
Boyetteit would also not hurt03:53
kernalcan't hurt to test03:53
Boyetteagree03:53
kernalhttps://unix.stackexchange.com/questions/38951/what-is-the-working-directory-when-cron-executes-a-job03:54
Boyetteok03:55
Boyettethat is actually referring to a similar problem03:55
Boyetteif cron would give that error03:55
Boyettebut it doesnt give the error03:55
Boyetteit seems it can just not run the script at all03:55
Boyetteit seems its already getting terminated before it even executed the script03:55
Boyettebut it also doesnt give an error about not being able to execute it03:56
Boyetteonly syslog gives error about creating the output for that.. which i also dont understand03:56
Boyettebut i adjusted it now03:56
Boyettenow the script doesnt like this04:00
kernal??04:04
kernalwhat's does the entry in cron look like?04:05
Boyetteftp needs a specific file.. its not used to read paths04:06
Boyettethats unusual04:06
kernaladd a 'cd' into to your script then, to get cron to change into that directory04:06
Boyette0 4 * * 0-6 bash /root/x/run.sh >> /root/wg/cronjobs1.log04:07
Boyette0 10 * * 0-6 bash /root/xftp.sh >> /root/wg/cronjobs2.log04:07
Boyette0 13 * * 0-6 bash /root/x/run.sh >> /root/wg/cronjobs3.log04:07
Boyette0 22 * * 0-6 bash /root/x/ftp.sh >> /root/wg/cronjobs4.log04:07
Boyette0 4 * * 0-6 bash /root/x/run.sh >> /root/wg/cronjobs1.log04:08
Boyette0 10 * * 0-6 bash /root/x/ftp.sh >> /root/wg/cronjobs2.log04:08
Boyette0 13 * * 0-6 bash /root/x/run.sh >> /root/wg/cronjobs3.log04:08
Boyette0 22 * * 0-6 bash /root/x/ftp.sh >> /root/wg/cronjobs4.log04:08
Boyetterun.sh is executed fine04:08
Boyetteftp.sh is just not running04:08
Boyettecronjobs2.log and cronjobs4.log are created or touched at the correct times but always stay completely empty04:09
Boyettewhile log 1 and 3 are written04:09
kernaladd a 'cd /root/x/' to the start of the script, so when it's run from cron it's working in the right directory04:09
Boyettebut it is already in the right directory04:10
Boyetteif that would be the issue why would run.sh work well04:10
Boyetteit has to do a lot of things04:10
kernalassuming that's where the '.xml' file is located that you want to ftp04:10
Boyettein that same directory04:10
Boyetteyes the xml is located there04:10
Boyetterun.sh is located there04:10
Boyetteftp.sh is located there04:10
Boyetteand run.sh creates the xml04:10
Boyettethat all works fine04:11
kernalwhen cron runs it's just calling the script from that directory, it's not working in that directory04:11
kernalso when it looks for 'xxxx.xml' it can't find it04:11
Boyetteok but the script itself only has to startup thats crons task04:11
Boyettenot running the script right?04:12
Boyettei added cd /*/* in the beginning04:23
kernalwhat does cd '/*/*' do?04:24
kernalbash: not a directory04:25
Boyettecd /root/x/04:26
Boyettewell see how this goes04:29
kernalgood to learn, just wrote a small script myself and set it to run on crontab04:35
kernalit detects if a file exists and it it does it will 'cat' it04:35
kernalif not it will echo "File does not exist"04:35
kernalthe cronjob just ran04:36
kernaland in the log 'File does not exist'04:36
kernalbut if I run the script myself and I'm in that directory...04:37
kernalFound file.04:37
kernalHello World!04:37
hggdhkernal: when you run cron, yo have to set your environment. Cron cleans up the user's environment before allowing a script to run04:37
Boyetteok04:37
kernal#!/bin/sh04:38
kernalfile="xxx.xml"04:38
kernalif [ ! -f $file ]; then04:38
kernal  echo "File not found."04:38
kernalelse04:38
kernal  echo "Found file."04:38
kernal  cat $file04:38
kernalfi04:38
hggdhkernal: usepastebin04:38
hggdhuse pastenbin04:38
kernalaye04:39
hggdhand, yes, this script will most certainly not quite work the way you  want under cron04:39
kernalI know mate, just showing Boyette as a test04:39
Boyetteok04:39
Boyetteso how exactly will it work?04:40
Boyette#!/bin/sh04:40
Boyettecd /root/x/04:40
BoyetteHOST='ftp.server.com'04:40
BoyettePORT='21'04:40
BoyetteUSER='xxxxxx'04:40
BoyettePASSWORD='xxxxxx'04:40
BoyetteFILE='xxxxx.xml'04:40
Boyetteftp -n $HOST $PORT <<END_SCRIPT04:40
Boyettequote USER $USER04:40
Boyettequote PASS $PASSWORD04:40
hggdh...04:40
Boyetteput $FILE04:40
Boyettequit04:40
BoyetteEND_SCRIPT04:40
Boyetteexit 004:40
hggdhBoyette: UESE PASTEBIN04:40
Boyettelike this?04:40
Boyettehttps://pastebin.com/rLF785iT04:41
* kernal steps out for luch04:41
hggdhBoyette: if your FTP server accepts the syntax you used for commands, it should work04:42
Boyettethe ftp server accepts it04:42
Boyetteif i run the script manually it runs fine04:42
Boyettebut the problem is that cron doesnt do it04:43
Boyettecron04:44
Boyettehttps://pastebin.com/DxcWcSWK04:44
Boyette1 and 3 runs fine04:44
Boyette2 and 4 doesnt run04:44
Boyettecreates empty log file but the log is touched at the correct times04:44
hggdhBoyette: on the shebang, add '-x' so it will read #!/bin/sh -x04:46
hggdhthen run it under cron again04:47
Boyetteadd -x04:48
Boyettewhat is that doing04:48
hggdhit will give you a "trace" of the commands executed by the shell04:48
Boyetteaah04:49
Boyetteyes that was missing aswell04:49
Boyettei had a different script before using bash instead of sh04:49
Boyettethere i got a trace04:49
Boyettebut i thought cron had trouble with bash so i changed it to sh then i lost the trace04:50
hggdhyou might also need a line after the shebang with "exec 2>&1"04:50
hggdhcron has no problems with bash, sh, or any other shell04:50
Boyettewell im stuck on this really not understanding why cron doesnt run this04:50
Boyettebecause empty logfile04:51
hggdhactually, change the exec to exec 2>&1 > /tmp/$0.log04:51
Boyetteok04:51
Boyetteonly in syslog i see this04:51
BoyetteCRON [2340] (root) CMD (bash /root/ftp.sh  >> root/cronjobs1.log)04:51
BoyetteCRON info NO MTA installed, discarding output)04:51
hggdhthis is just telling you cron will not email you the output because you do not have a MTA installed04:52
Boyetteyes04:53
hggdhchange  the 'exec' lne as I pointed out04:53
Boyettei know but what i dont understand is why its also not logging it as its told to do04:53
Boyettelike this?04:53
Boyettehttps://pastebin.com/QRMdkssX04:53
hggdhthe exec is on its own line, after the shebang04:54
hggdhexec 2>&1 > /tmp/$0.log04:54
hggdhwait04:55
hggdhchange the $0 to a string, you are running it with a full path04:56
Boyetteok04:56
hggdhline: exec 2>&1 > /tmp/cron-out.log04:56
hggdhbrb04:56
Boyettehttps://pastebin.com/hB2MDRem04:57
hggdhyes05:02
Boyettecorrect?05:02
hggdhafter running it thru cron look at /tmp/cron-out.log05:03
Boyetteok05:04
Boyettei will05:04
Boyettehopefully this works now05:04
Boyettemy final goal is actually another step ahead05:04
hggdhit will not, but it will show you what happened05:04
Boyettehehe  ok05:05
Boyettefirst i want those 2 scripts to run after the other one is finished05:05
Boyettebut the ftp.sh i couldnt make it happen automatically05:05
Boyetteif this finally works05:05
Boyettewhat would actually be more nice if it can always keeps running05:05
Boyetteso when 1 stops the other one starts and when that is finished the other one starts05:06
Boyettedo u understand what I mean?05:06
Boyettelike a neverending process05:06
hggdhwell... this is not exactly what you showed us in the crontab. There the scripts are set to run at specific times05:07
Boyetteyes i know05:07
Boyettebecause i dont know how to do that like the way i was saying05:07
Boyetteso i was thinking of first running it like this 2 times a day05:07
Boyettebut better would be that the other sh is always starting when the other stops05:08
Boyettebut i dont know if crontab supports that at all05:08
Boyettebecause it looks pretty time based to me05:08
hggdhcron actions are time-based, on the schedule you provided05:09
Boyetteyes so what i want cant be achieved with crontab at all?05:09
hggdh<shrug/> perhaps. if you want script2 to be run after script1, then probably the easiest way is to merge both of them05:11
Boyettethats impossible05:11
Boyettei think05:11
Boyette:P05:11
Boyettebut would actually make sense05:11
Boyettebut the problem is i think that in the run.sh is not defined when the script stops05:13
Boyetteit just stops when its finished05:13
Boyetteso how to determine that05:14
hggdhit ends at the end of the script05:14
Boyettethis is the run.sh05:14
Boyettehttps://pastebin.com/yAENyPCq05:14
kernalput the commands from script2 into the bottom of script105:14
kernalmaking only one script05:14
Boyettethis is script 105:15
Boyettee script05:15
kernalthat way the fpt will only start after the commands from script1 has finished05:15
Boyettehttps://pastebin.com/yAENyPCq05:15
Boyettecan it really be added there?05:15
Boyettebecause it using mono05:15
Boyetteand .exe05:15
hggdhyes. Now, if the call to mono will ever end, this is a different issue05:16
Boyetteexactly05:16
Boyettethat will just end when its finished doing its business05:16
Boyettebut the script is just to start that not to end that process05:16
Boyettethats why i was doing it like this with enough time to be sure its finished05:17
hggdhno...05:17
kernalbash will only move onto the next line/command if the previous line/command has finished05:18
Boyetteso if the process is still running it will know?05:18
hggdhlet's suppose, for the sake of argument, the the program called by mono DOES end. It may take a few seconds, or a few hours05:18
hggdhI do not really care05:18
Boyetteyes it takes hours05:18
hggdhAFTER the mono program ends, then the next script line will be executed (exit 0)05:19
hggdhso, add your second script before the exit 0 line05:19
Boyettequit 0 you mean ?05:19
hggdhyes05:20
hggdhand I am pretty sure this script is being re-purposed05:20
Boyetteso like this ?05:21
Boyettehttps://pastebin.com/vZKV1z6V05:21
hggdhalmost. move the 'exec 2>&1 ...' to the top, after the real shebang05:23
Boyettelike this05:25
Boyettehttps://pastebin.com/4pPB29sq05:25
Boyettebut actually this script does log very well05:25
Boyettein crontab1 and 305:25
Boyettealready05:25
hggdhas you wish, then05:28
Boyettebut it doesnt matter05:28
Boyetteto make 2 logs05:28
Boyettedo you think its fine like this?05:28
Boyettehttps://pastebin.com/4pPB29sq05:28
hggdhyes05:28
Boyetteok but if this works05:29
Boyetteits just 1 process now05:29
hggdhyes05:29
Boyettebut how do we make sure that 1 process is restarting as soon as its finished?05:29
Boyetteor always running05:29
hggdhthen you have to change the logic05:30
hggdhbut this is not something I have time to do now05:30
hggdh(heading for bed)05:30
Boyetteok05:30
Boyettedo u have 1 minute05:30
hggdh1 minute05:30
Boyettei will check what happens if i do run.sh now05:30
hggdhvia cron05:30
Boyettemanually05:31
Boyetteit should also work05:31
hggdhbut your probme is with cron05:31
hggdhah well05:31
Boyettewell05:32
Boyettenot anymore if the 2 scripts are 1 now05:32
Boyettebecause 1 runs fine05:32
Boyetteit wont suddenly stop doing that i suppose05:32
hggdhBoyette: you really do not know shell scripting, do you?05:33
Boyettei dont05:34
Boyettei used google05:34
kernalyour original problem was that the ftp did not run in cron?05:34
Boyettefor all of this so far05:34
hggdhah05:34
Boyetteyes05:34
kernaland you said it would run when you manually run it05:34
Boyetteyes it did05:34
kernalso manually running it now, it will prob work again05:34
hggdhyou need to start learning :-)05:35
Boyettewell but now we merged it05:35
kernalcircling back to your original problem, that it won't run in cron again05:35
hggdhyes, it should work (if It was before, manually) with the two script together05:35
Boyettebut it doesnt run anymore  :P05:35
Boyettemanually05:35
hggdhbut it will most probably fail the same under cron05:35
hggdhOK. pastebin the log05:36
Boyettejust saying05:36
Boyetteline2: /tmp/cron-out.log: no such file or directory05:37
Boyettei have to make it in root i think05:37
hggdhyou do not have /tmp?05:37
hggdhdammit05:38
Boyetteapparently05:38
hggdhexec 2>&1 > /tmp/cron-out.log05:38
Boyetteno05:38
hggdhwe missed the second '>'05:38
Boyettei do have a tmp05:38
Boyetteah ok05:39
Boyettenow its running05:40
Boyettebut i dont see anything in terminal anymore05:40
Boyetteso i cant see what its doing05:40
Boyettejust blinking cursor05:40
Boyetteprobably because it writing only to the log now05:40
hggdhno, you will not, since it is writing to /tmp/cron-out.log05:40
Boyetteactually more tidy05:40
hggdhBEFORE pastebinning the log -- sanitise the output (server address, user, password)05:41
Boyetteyes its working05:41
Boyettei can see in the cron out log now that its doing its job05:41
hggdhyes, it would work (based on you asserting it was working manually before)05:41
hggdhit is the cron run that will fail05:42
Boyettewell this script 1 was also working with cron05:42
Boyettebut script 2 not05:42
Boyettebut according to the fact that script 2 is now in script 1 it will be fine with only script 105:42
hggdhand, since script 1 is now followed by script 2, then it will fail05:42
Boyetteunless cron is now also struggling on script 1 because it doesnt like script 2 in there05:42
Boyettemaybe05:42
Boyettewell see05:42
hggdhnothing to do05:42
Boyettebut we adjusted that aswell05:43
hggdhscript 2 (embedded in the first script will fail because it was failing before05:43
hggdhand nothing was changed05:43
Boyettebut the script itself was not failing .. only when cron runned it05:43
Boyetteso probably this time it will work because i runned it manually05:43
hggdhyes. I know. And this is what I have been telling you05:43
Boyettebut when cron runs it next time we will see05:44
Boyetteyes exactly05:44
Boyettebut we also added the call to the directory05:44
Boyettewhich might solve it05:44
hggdhyou will find out05:44
hggdh:-)05:44
hggdhand... I am out05:44
Boyettethank you sir!05:44
hggdhyw05:44
Boyettekernal are you still there?05:45
kernalno05:45
Boyettelol05:45
Boyettei think u were completely right in the first place05:45
Boyettelook at this05:45
BoyetteCRON [2340] (root) CMD (bash /root/ftp.sh  >> root/cronjobs1.log)05:45
Boyettethat was in the original systemlog05:45
Boyette/root/ftp.sh   (this is incorrect)05:45
Boyetteshould be05:45
Boyette/root/x/ftp.sh05:46
Boyettewhich is indicating that crontab tries to run ftp.sh from root05:46
Boyettewhere it is not located05:46
Boyettethats exactly what u pointed out05:46
kernal;)05:46
Boyettei just noticed when i send that line again to hggdh05:46
kernalbloody pull paths and cron05:46
Boyetteit never catched my eye05:47
Boyetteso probably the cd command is already solving it all05:47
Boyetteand my mistake was it didnt matter because run.sh worked fine.. but run.sh is not pointing out to any local directory.. it goes online05:48
Boyetteso the problem was not applicable to run.sh because it doesnt use any local directions05:48
Boyettethats my mistake where i went thinking in the wrong direction05:48
kernalhggdh, seems very knowledgeable05:48
Boyettei think he is a programmer05:49
Boyettebut to be honest this is actually not rocket science05:49
Boyettebut he knows shell scripting05:49
Boyettei dont05:49
Boyettei just googled it all so far05:49
Boyetteanyway thank you very much05:51
Boyettelets hope this fixed it05:51
Boyetteotherwise i really know now where the problem is05:51
Boyetteand maybe this will make sure it always runs later05:53
Boyettehttps://stackoverflow.com/questions/298760/how-to-make-sure-an-application-keeps-running-on-linux05:53
Boyetteout05:57
TalikkafIs it possible to download a pre-release of Ubuntu MATE 18.04 (alpha, beta, RC or something similar?)06:28
alkisgTalikkaf: sure, there are the daily build isos available06:29
Talikkafindeed06:30
Talikkafsilly me, why did I not google it.  http://cdimage.ubuntu.com/ubuntu-mate/daily-live/06:30
mate|1240i am having a problem with insync not starting in 17.10 can anybody help me ?09:18
guest-xxfbechello12:51
guest-xxfbecanyone there12:52
guest-xxfbec12:52
diogenes_guest-xxfbec, 84 people total12:52
=== natten is now known as christian_crow
=== christian_crow is now known as natten
Boyettehi21:18
=== Nathan_ is now known as kernal

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