-
• #1027
Scripts run from cron aren't inheriting your interactive shell setup, and often have a different PATH. You can find the absolute path of each of the programs it's complaining about by typing eg.
$ which blockdev
in your shell, and then use the result (
/sbin/blockdev
or whatever it happens to be) explicitly in the script. Or just add that directory to PATH inside the script. -
• #1028
Excellent, thanks all. That's got it working now.
Now just need to work out why cron doesn't work with the command which includes the date.
EDIT: Turns out I needed to escape the + and % with a backslash
-
• #1029
I have an annoying issue that I keep bumping into that I suspect has a simple solution (I'm guessing I screwed something up somewhere).
I have a number of folders on a Windows machine mounted using /etc/fstab. Generally all works fine but every so often they don't all mount properly (I suspect it's when I've had a powercut or similar and the linux machine boots up before the windows one).
Linux machine auto-downloads various stuff and uses those mounted folders to save it to the network. When the mount isn't working it just saves the files to the raspberry pi (the same folder that is normally mounted) and swiftly fills up the SD card. How do I stop this happening? Downloading is generally happening on sabnzbd
-
• #1030
You could make the directory read-only on the underlying FS, so the write will always fail unless the mount has succeeded.
-
• #1031
That sounds like it should work. Will give it a try. Cheers.
-
• #1032
I posted this in the Pi thread, but just incase:
for those using pihole if your update "breaks" and complains iproute2 is missing
check /etc/apt/sources.list and make sure it's right... mine was zero'd somehow, and iproute2 is now in backports for Debian Buster.
If you want the real tech info, I filed my findings (and suggestions) here:
https://github.com/pi-hole/pi-hole/pull/3537
... guess my username ... :P -
• #1033
snap can fuck right off, can't it.
-
• #1034
I do miss being able to run
df
without having to grep out all the snaps.I understand the attraction of packaging apps up like the Mac .dmg style, though.
Cheers all for the assistance.
It looks like I have a few issues. First one is that the full command wasn't being executed for some reason so however I tried to log it I wasn't getting any output. The command actually being executed was this :
Should stuff be in quotes or something? I've not seen any reference to that before.
When I shorten down the output so the command does run I get the following error in my log file
Not sure why it runs when I run it directly but not using cron. I can't find any reference to it from googling the script.