Page 1 of 1

Cumulus on a Samba share - no autostart with start stop skript

Posted: Mon 25 Dec 2017 8:51 pm
by maddinthebrain
Hello folks,
As a I had damaged SD card with my raspi I put Cumulus on my Nas and mounted the share by Samba in the original place in the directory tree. Everything works fine but autostart after booting the raspbian. I guess it's because the share is not mounted quick enough. Starting it manually works fine. The backup and the daily restart defined in crop job work fine as well.

Any idea? Thanks in advance.

Merry Christmas

Martin

Re: Cumulus on a Samba share - no autostart with start stop skript

Posted: Mon 25 Dec 2017 11:08 pm
by dazza1223
same here mate but i cant find the way to fix it

Re: Cumulus on a Samba share - no autostart with start stop skript

Posted: Mon 25 Dec 2017 11:21 pm
by jlmr731
Is your network share mounted at boot?
Are you using a bash script to start up cumulus?

If yes then you can add in a delay to your cumulus start up script.
Like this

Code: Select all

#!/bin/bash
sleep 30
## the rest of you startup script.....
Now the sleep command will pause for what time you use to sleep 10 sec use sleep 10, to sleep 2 minutes use sleep 2m.
Depending on when in the boot up process your script and networking share get started you may have to adjust the time.
maybe start at 2 minutes to see if that works

Re: Cumulus on a Samba share - no autostart with start stop skript

Posted: Mon 25 Dec 2017 11:27 pm
by dazza1223
o ok i will try that thank u

Re: Cumulus on a Samba share - no autostart with start stop skript

Posted: Wed 27 Dec 2017 6:03 pm
by maddinthebrain
I use cronjob to start Cumulus.

Code: Select all

@reboot sudo /home/pi/CumulusMX/cumulusmx.sh  
It is the start stop Skript.
How to do this here? Put it in a small bash file? Like that

Code: Select all

#!/bin/bash
sleep 30
Sudo /home/pi/CumulusMX/cumulusmx.sh  
?

Martin

Re: Cumulus on a Samba share - no autostart with start stop skript

Posted: Wed 27 Dec 2017 8:20 pm
by dazza1223
yh mate put it at the top off it

Re: Cumulus on a Samba share - no autostart with start stop skript

Posted: Fri 29 Dec 2017 10:01 pm
by maddinthebrain
It worked! Perfect! Thanks a lot

Martin

Re: Cumulus on a Samba share - no autostart with start stop skript

Posted: Fri 29 Dec 2017 10:18 pm
by dazza1223
Glad to here that

Re: Cumulus on a Samba share - no autostart with start stop skript

Posted: Sat 30 Dec 2017 3:44 pm
by jlmr731
maddinthebrain wrote:I use cronjob to start Cumulus.

Code: Select all

@reboot sudo /home/pi/CumulusMX/cumulusmx.sh  
It is the start stop Skript.
How to do this here? Put it in a small bash file? Like that

Code: Select all

#!/bin/bash
sleep 30
Sudo /home/pi/CumulusMX/cumulusmx.sh  
?

Martin
glad to here that worked, figured it was easier than writing a script to check if share was up.

Now you should be able to to put the sleep 30 inside the cumulusmx.sh instead of making another script to call cumulusmx.sh

Re: Cumulus on a Samba share - no autostart with start stop skript

Posted: Sat 30 Dec 2017 9:00 pm
by maddinthebrain
jlmr731 wrote:
glad to here that worked, figured it was easier than writing a script to check if share was up.

Yeah, indeed. Even if it is not perfect but it works.
jlmr731 wrote:
Now you should be able to to put the sleep 30 inside the cumulusmx.sh instead of making another script to call cumulusmx.sh
Well I guess I'll leave this way, because the Smart home server Fhem had the same problem, I call its script with an additional line in my startup.sh.
Furthermore I don't want to edit those scripts, as they will be updated from time to time.


Cheers Martin

Re: Cumulus on a Samba share - no autostart with start stop skript

Posted: Sat 06 Jan 2018 1:31 pm
by jank
Hello

the cumulusMX Start Stop Script is able to handle such conditions.
Some month ago, one had a problem running cumulusmx.sh when installed on a USB Drive which was also not mounted at system boot.
PLease check this: https://cumulus.hosiene.co.uk/viewtopic.p ... &start=150

Or a more inproved version: https://cumulus.hosiene.co.uk/viewtopic.p ... 59#p120459
This is, when cumulusmx.sh is being started by a init.d startup script but network drives are not mounted yet.
In this case, the script will run in a kind of loop until the drives are available....

cheers jan

Re: Cumulus on a Samba share - no autostart with start stop skript

Posted: Sat 06 Jan 2018 4:59 pm
by jlmr731
jank wrote:Hello

the cumulusMX Start Stop Script is able to handle such conditions.
Some month ago, one had a problem running cumulusmx.sh when installed on a USB Drive which was also not mounted at system boot.
PLease check this: https://cumulus.hosiene.co.uk/viewtopic.p ... &start=150

Or a more inproved version: https://cumulus.hosiene.co.uk/viewtopic.p ... 59#p120459
This is, when cumulusmx.sh is being started by a init.d startup script but network drives are not mounted yet.
In this case, the script will run in a kind of loop until the drives are available....

cheers jan
I thought of that script but was not sure it was setup to check for mounts, as i always look for the easiest thing to do.

Re: Cumulus on a Samba share - no autostart with start stop skript

Posted: Sun 07 Jan 2018 12:42 pm
by jank
As far as I remember I made this option because for any reason the cron entry "@reboot" does not work anymore.
Someone had CumulusMX installed on a USB drive but it was mounted after the init.d Sctipt was executed with the result, that CumuluxMX could not be started.
For this reason, I made the option ./cumulusmx.sh -w (watchdog)
In this case you can create a normal cronjob which is being executed every 10 minutes (for example).
In case CumulusMX is already runing, nothing happens. In case CumulusMX is NOT running it is being started.
So in the worst case, CumulusMX is being started 10 minutes after reboot....his should be enough time to mount a USB drive or a network drive.
Jan