[01:27] hi [01:27] hi [01:27] how its work this channel ? its used for ? [01:28] Topic 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/ === hellowar is now known as HelloWar [01:51] hello, i'm looking for help. i'm not receiving email confirmation emails [01:51] hello [01:51] sounds like an email isssue [01:51] hi [01:52] not really a ubuntu mate issue [01:52] I've checke [01:53] i've checked my mailbox it worked; i can receive test emails.. [01:54] alright, how is your email linked to a problem with ubuntu mate? [01:55] who is your email provider? [01:57] i'm trying to signup with the ubuntu-mate community (through the website). [01:57] What is the support email address for the ubuntu-mate community? [01:59] i have my own email-domain (with webhoster). [02:00] thanks for responding! [02:00] I'm just signing up now myself [02:01] and I just received an email [02:01] "Welcome to Ubuntu MATE Community! [02:01] Click the following link to confirm and activate your new account:" [02:01] it was very quick to receive the activation email [02:05] Thank you. i'll try again tomorrow. This link email has yet to arrive for me after several attempts. [02:05] bye.. bedtim [03:29] hi [03:29] hi [03:30] wow there are really ppl alive here [03:30] :P [03:30] didnt even know this still existed [03:30] this whole irc thing [03:30] but its alive and kicking [03:31] still existed??? It never left [03:31] apparently [03:33] im stuck on some cron problem it must be very simple but i cant fix it [03:33] i was hoping to find some living soul who can enlighten me [03:34] i don't normally tell dad jokes, but when i do he laughs [03:34] that sounds like alive [03:35] shoot [03:36] although, I'm still rather new with ubuntu [03:36] i have crontab setup to run 4 times a sh script a day [03:36] script 1 compiles a file [03:36] script 2 ftp's the file to another server [03:36] script 3= scipt 1 [03:36] script 4 = script 2 [03:36] script 1 and 3 runs fine [03:37] script 2 and 4 never run however crontab does compile a logfile which is always empty [03:37] but is touched at the right time [03:37] syslog reports: [03:37] using sftp to transfer the file? [03:38] CRON [2340] (root) CMD (bash /root/ftp.sh >> root/cronjobs1.log) [03:38] CRON info NO MTA installed, discarding output) [03:38] if i run the ftp.sh manually it runs fine [03:39] but if cron has to do it automated it is just not doing anything [03:39] but i cant find a clue why [03:39] have you used the full path names? that has caught me out before [03:39] the pathnames must be correct [03:40] ftp.sh is in the same directory [03:40] like /home/$USER/some/folder | not just some/folder [03:40] as makethefuckingfile.sh [03:40] So, is anyone in here running the 18.04 dailies? [03:40] and makethefuckingfile.sh does work [03:40] thats me mr techman [03:40] I kinda wanna check out the progress with the dash menu and stuff with MATE [03:40] im on mate 18,04 [03:40] @Techman, no 18.04 for me yet [03:40] Not sure if it's stable enough to look on with a liveusb [03:41] its very stable [03:41] I know wimpy was saying a few weeks ago that stuff was being moved around a lot [03:41] only mesa is not [03:41] but this problem i have btw is not on mate 18,04 but 16 [03:41] Oh, don't mind me [03:41] well matepanel gets fuckeed up sometimes [03:41] I just asked a question without watching what the previous conversation was [03:41] yes [03:41] * Techman goes back to idling [03:42] i was asking some help with my cron sh problem [03:42] did u get me mr. kernal? [03:43] if path was incorrect script2 would also not run [03:45] https://askubuntu.com/questions/23009/why-crontab-scripts-are-not-working [03:46] permission problems [03:46] i have looked into that [03:46] chmod 755 [03:46] chmod +x [03:46] sorry bud, still a lot to learn myself [03:47] hehe ok [03:47] its actually a common problem [03:47] got a pastebin of the script? [03:47] probably [03:47] the ftp script? [03:47] yeah [03:48] just a moment [03:48] need to copy from the server [03:50] #!/bin/sh [03:50] HOST='ftp.server.com' [03:50] PORT='21' [03:50] USER='email@domain.com [03:50] PASSWORD='xxxxxxxxxx' [03:50] FILE='xxx.xml' [03:50] ftp -n $HOST $PORT < quote USER $USER [03:50] quote PASS $PASSWORD [03:50] put $FILE [03:50] quit [03:50] END_SCRIPT [03:50] exit 0 [03:50] but that runs well if i run it manually [03:51] try changing the file path [03:51] that's what I meant about full paths [03:51] the file path in cron ? [03:51] in the script [03:51] FILE='xxx.xml' [03:51] the file is in the same directory as the ftp.sh [03:51] put in the full path [03:52] I know, but in cron it likes to have the full path [03:52] ???? [03:52] i 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 that [03:52] in cron the full path to the ftp.sh is there [03:52] this has caught me out before with some shell scripts that run on cronjobs [03:52] it doesnt need to know a path to a file in the script because cron is starting the script not executing the actual ftp transaction [03:53] i can however do it [03:53] it would also not hurt [03:53] can't hurt to test [03:53] agree [03:54] https://unix.stackexchange.com/questions/38951/what-is-the-working-directory-when-cron-executes-a-job [03:55] ok [03:55] that is actually referring to a similar problem [03:55] if cron would give that error [03:55] but it doesnt give the error [03:55] it seems it can just not run the script at all [03:55] it seems its already getting terminated before it even executed the script [03:56] but it also doesnt give an error about not being able to execute it [03:56] only syslog gives error about creating the output for that.. which i also dont understand [03:56] but i adjusted it now [04:00] now the script doesnt like this [04:04] ?? [04:05] what's does the entry in cron look like? [04:06] ftp needs a specific file.. its not used to read paths [04:06] thats unusual [04:06] add a 'cd' into to your script then, to get cron to change into that directory [04:07] 0 4 * * 0-6 bash /root/x/run.sh >> /root/wg/cronjobs1.log [04:07] 0 10 * * 0-6 bash /root/xftp.sh >> /root/wg/cronjobs2.log [04:07] 0 13 * * 0-6 bash /root/x/run.sh >> /root/wg/cronjobs3.log [04:07] 0 22 * * 0-6 bash /root/x/ftp.sh >> /root/wg/cronjobs4.log [04:08] 0 4 * * 0-6 bash /root/x/run.sh >> /root/wg/cronjobs1.log [04:08] 0 10 * * 0-6 bash /root/x/ftp.sh >> /root/wg/cronjobs2.log [04:08] 0 13 * * 0-6 bash /root/x/run.sh >> /root/wg/cronjobs3.log [04:08] 0 22 * * 0-6 bash /root/x/ftp.sh >> /root/wg/cronjobs4.log [04:08] run.sh is executed fine [04:08] ftp.sh is just not running [04:09] cronjobs2.log and cronjobs4.log are created or touched at the correct times but always stay completely empty [04:09] while log 1 and 3 are written [04:09] add a 'cd /root/x/' to the start of the script, so when it's run from cron it's working in the right directory [04:10] but it is already in the right directory [04:10] if that would be the issue why would run.sh work well [04:10] it has to do a lot of things [04:10] assuming that's where the '.xml' file is located that you want to ftp [04:10] in that same directory [04:10] yes the xml is located there [04:10] run.sh is located there [04:10] ftp.sh is located there [04:10] and run.sh creates the xml [04:11] that all works fine [04:11] when cron runs it's just calling the script from that directory, it's not working in that directory [04:11] so when it looks for 'xxxx.xml' it can't find it [04:11] ok but the script itself only has to startup thats crons task [04:12] not running the script right? [04:23] i added cd /*/* in the beginning [04:24] what does cd '/*/*' do? [04:25] bash: not a directory [04:26] cd /root/x/ [04:29] well see how this goes [04:35] good to learn, just wrote a small script myself and set it to run on crontab [04:35] it detects if a file exists and it it does it will 'cat' it [04:35] if not it will echo "File does not exist" [04:36] the cronjob just ran [04:36] and in the log 'File does not exist' [04:37] but if I run the script myself and I'm in that directory... [04:37] Found file. [04:37] Hello World! [04:37] kernal: when you run cron, yo have to set your environment. Cron cleans up the user's environment before allowing a script to run [04:37] ok [04:38] #!/bin/sh [04:38] file="xxx.xml" [04:38] if [ ! -f $file ]; then [04:38] echo "File not found." [04:38] else [04:38] echo "Found file." [04:38] cat $file [04:38] fi [04:38] kernal: usepastebin [04:38] use pastenbin [04:39] aye [04:39] and, yes, this script will most certainly not quite work the way you want under cron [04:39] I know mate, just showing Boyette as a test [04:39] ok [04:40] so how exactly will it work? [04:40] #!/bin/sh [04:40] cd /root/x/ [04:40] HOST='ftp.server.com' [04:40] PORT='21' [04:40] USER='xxxxxx' [04:40] PASSWORD='xxxxxx' [04:40] FILE='xxxxx.xml' [04:40] ftp -n $HOST $PORT < quote USER $USER [04:40] quote PASS $PASSWORD [04:40] ... [04:40] put $FILE [04:40] quit [04:40] END_SCRIPT [04:40] exit 0 [04:40] Boyette: UESE PASTEBIN [04:40] like this? [04:41] https://pastebin.com/rLF785iT [04:41] * kernal steps out for luch [04:42] Boyette: if your FTP server accepts the syntax you used for commands, it should work [04:42] the ftp server accepts it [04:42] if i run the script manually it runs fine [04:43] but the problem is that cron doesnt do it [04:44] cron [04:44] https://pastebin.com/DxcWcSWK [04:44] 1 and 3 runs fine [04:44] 2 and 4 doesnt run [04:44] creates empty log file but the log is touched at the correct times [04:46] Boyette: on the shebang, add '-x' so it will read #!/bin/sh -x [04:47] then run it under cron again [04:48] add -x [04:48] what is that doing [04:48] it will give you a "trace" of the commands executed by the shell [04:49] aah [04:49] yes that was missing aswell [04:49] i had a different script before using bash instead of sh [04:49] there i got a trace [04:50] but i thought cron had trouble with bash so i changed it to sh then i lost the trace [04:50] you might also need a line after the shebang with "exec 2>&1" [04:50] cron has no problems with bash, sh, or any other shell [04:50] well im stuck on this really not understanding why cron doesnt run this [04:51] because empty logfile [04:51] actually, change the exec to exec 2>&1 > /tmp/$0.log [04:51] ok [04:51] only in syslog i see this [04:51] CRON [2340] (root) CMD (bash /root/ftp.sh >> root/cronjobs1.log) [04:51] CRON info NO MTA installed, discarding output) [04:52] this is just telling you cron will not email you the output because you do not have a MTA installed [04:53] yes [04:53] change the 'exec' lne as I pointed out [04:53] i know but what i dont understand is why its also not logging it as its told to do [04:53] like this? [04:53] https://pastebin.com/QRMdkssX [04:54] the exec is on its own line, after the shebang [04:54] exec 2>&1 > /tmp/$0.log [04:55] wait [04:56] change the $0 to a string, you are running it with a full path [04:56] ok [04:56] line: exec 2>&1 > /tmp/cron-out.log [04:56] brb [04:57] https://pastebin.com/hB2MDRem [05:02] yes [05:02] correct? [05:03] after running it thru cron look at /tmp/cron-out.log [05:04] ok [05:04] i will [05:04] hopefully this works now [05:04] my final goal is actually another step ahead [05:04] it will not, but it will show you what happened [05:05] hehe ok [05:05] first i want those 2 scripts to run after the other one is finished [05:05] but the ftp.sh i couldnt make it happen automatically [05:05] if this finally works [05:05] what would actually be more nice if it can always keeps running [05:06] so when 1 stops the other one starts and when that is finished the other one starts [05:06] do u understand what I mean? [05:06] like a neverending process [05:07] well... this is not exactly what you showed us in the crontab. There the scripts are set to run at specific times [05:07] yes i know [05:07] because i dont know how to do that like the way i was saying [05:07] so i was thinking of first running it like this 2 times a day [05:08] but better would be that the other sh is always starting when the other stops [05:08] but i dont know if crontab supports that at all [05:08] because it looks pretty time based to me [05:09] cron actions are time-based, on the schedule you provided [05:09] yes so what i want cant be achieved with crontab at all? [05:11] perhaps. if you want script2 to be run after script1, then probably the easiest way is to merge both of them [05:11] thats impossible [05:11] i think [05:11] :P [05:11] but would actually make sense [05:13] but the problem is i think that in the run.sh is not defined when the script stops [05:13] it just stops when its finished [05:14] so how to determine that [05:14] it ends at the end of the script [05:14] this is the run.sh [05:14] https://pastebin.com/yAENyPCq [05:14] put the commands from script2 into the bottom of script1 [05:14] making only one script [05:15] this is script 1 [05:15] e script [05:15] that way the fpt will only start after the commands from script1 has finished [05:15] https://pastebin.com/yAENyPCq [05:15] can it really be added there? [05:15] because it using mono [05:15] and .exe [05:16] yes. Now, if the call to mono will ever end, this is a different issue [05:16] exactly [05:16] that will just end when its finished doing its business [05:16] but the script is just to start that not to end that process [05:17] thats why i was doing it like this with enough time to be sure its finished [05:17] no... [05:18] bash will only move onto the next line/command if the previous line/command has finished [05:18] so if the process is still running it will know? [05:18] let's suppose, for the sake of argument, the the program called by mono DOES end. It may take a few seconds, or a few hours [05:18] I do not really care [05:18] yes it takes hours [05:19] AFTER the mono program ends, then the next script line will be executed (exit 0) [05:19] so, add your second script before the exit 0 line [05:19] quit 0 you mean ? [05:20] yes [05:20] and I am pretty sure this script is being re-purposed [05:21] so like this ? [05:21] https://pastebin.com/vZKV1z6V [05:23] almost. move the 'exec 2>&1 ...' to the top, after the real shebang [05:25] like this [05:25] https://pastebin.com/4pPB29sq [05:25] but actually this script does log very well [05:25] in crontab1 and 3 [05:25] already [05:28] as you wish, then [05:28] but it doesnt matter [05:28] to make 2 logs [05:28] do you think its fine like this? [05:28] https://pastebin.com/4pPB29sq [05:28] yes [05:29] ok but if this works [05:29] its just 1 process now [05:29] yes [05:29] but how do we make sure that 1 process is restarting as soon as its finished? [05:29] or always running [05:30] then you have to change the logic [05:30] but this is not something I have time to do now [05:30] (heading for bed) [05:30] ok [05:30] do u have 1 minute [05:30] 1 minute [05:30] i will check what happens if i do run.sh now [05:30] via cron [05:31] manually [05:31] it should also work [05:31] but your probme is with cron [05:31] ah well [05:32] well [05:32] not anymore if the 2 scripts are 1 now [05:32] because 1 runs fine [05:32] it wont suddenly stop doing that i suppose [05:33] Boyette: you really do not know shell scripting, do you? [05:34] i dont [05:34] i used google [05:34] your original problem was that the ftp did not run in cron? [05:34] for all of this so far [05:34] ah [05:34] yes [05:34] and you said it would run when you manually run it [05:34] yes it did [05:34] so manually running it now, it will prob work again [05:35] you need to start learning :-) [05:35] well but now we merged it [05:35] circling back to your original problem, that it won't run in cron again [05:35] yes, it should work (if It was before, manually) with the two script together [05:35] but it doesnt run anymore :P [05:35] manually [05:35] but it will most probably fail the same under cron [05:36] OK. pastebin the log [05:36] just saying [05:37] line2: /tmp/cron-out.log: no such file or directory [05:37] i have to make it in root i think [05:37] you do not have /tmp? [05:38] dammit [05:38] apparently [05:38] exec 2>&1 > /tmp/cron-out.log [05:38] no [05:38] we missed the second '>' [05:38] i do have a tmp [05:39] ah ok [05:40] now its running [05:40] but i dont see anything in terminal anymore [05:40] so i cant see what its doing [05:40] just blinking cursor [05:40] probably because it writing only to the log now [05:40] no, you will not, since it is writing to /tmp/cron-out.log [05:40] actually more tidy [05:41] BEFORE pastebinning the log -- sanitise the output (server address, user, password) [05:41] yes its working [05:41] i can see in the cron out log now that its doing its job [05:41] yes, it would work (based on you asserting it was working manually before) [05:42] it is the cron run that will fail [05:42] well this script 1 was also working with cron [05:42] but script 2 not [05:42] but according to the fact that script 2 is now in script 1 it will be fine with only script 1 [05:42] and, since script 1 is now followed by script 2, then it will fail [05:42] unless cron is now also struggling on script 1 because it doesnt like script 2 in there [05:42] maybe [05:42] well see [05:42] nothing to do [05:43] but we adjusted that aswell [05:43] script 2 (embedded in the first script will fail because it was failing before [05:43] and nothing was changed [05:43] but the script itself was not failing .. only when cron runned it [05:43] so probably this time it will work because i runned it manually [05:43] yes. I know. And this is what I have been telling you [05:44] but when cron runs it next time we will see [05:44] yes exactly [05:44] but we also added the call to the directory [05:44] which might solve it [05:44] you will find out [05:44] :-) [05:44] and... I am out [05:44] thank you sir! [05:44] yw [05:45] kernal are you still there? [05:45] no [05:45] lol [05:45] i think u were completely right in the first place [05:45] look at this [05:45] CRON [2340] (root) CMD (bash /root/ftp.sh >> root/cronjobs1.log) [05:45] that was in the original systemlog [05:45] /root/ftp.sh (this is incorrect) [05:45] should be [05:46] /root/x/ftp.sh [05:46] which is indicating that crontab tries to run ftp.sh from root [05:46] where it is not located [05:46] thats exactly what u pointed out [05:46] ;) [05:46] i just noticed when i send that line again to hggdh [05:46] bloody pull paths and cron [05:47] it never catched my eye [05:47] so probably the cd command is already solving it all [05:48] and my mistake was it didnt matter because run.sh worked fine.. but run.sh is not pointing out to any local directory.. it goes online [05:48] so the problem was not applicable to run.sh because it doesnt use any local directions [05:48] thats my mistake where i went thinking in the wrong direction [05:48] hggdh, seems very knowledgeable [05:49] i think he is a programmer [05:49] but to be honest this is actually not rocket science [05:49] but he knows shell scripting [05:49] i dont [05:49] i just googled it all so far [05:51] anyway thank you very much [05:51] lets hope this fixed it [05:51] otherwise i really know now where the problem is [05:53] and maybe this will make sure it always runs later [05:53] https://stackoverflow.com/questions/298760/how-to-make-sure-an-application-keeps-running-on-linux [05:57] out [06:28] Is it possible to download a pre-release of Ubuntu MATE 18.04 (alpha, beta, RC or something similar?) [06:29] Talikkaf: sure, there are the daily build isos available [06:30] indeed [06:30] silly me, why did I not google it. http://cdimage.ubuntu.com/ubuntu-mate/daily-live/ [09:18] i am having a problem with insync not starting in 17.10 can anybody help me ? [12:51] hello [12:52] anyone there [12:52] pö [12:52] guest-xxfbec, 84 people total === natten is now known as christian_crow === christian_crow is now known as natten [21:18] hi === Nathan_ is now known as kernal