WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: filetool.sh - if [ -s /tmp/backup_status ] output error message  (Read 1821 times)

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
filetool.sh - if [ -s /tmp/backup_status ] output error message
« on: November 28, 2016, 05:37:11 PM »
I have files listed in  /opt/.filetool.lst  which aren't always present, so  filetool.sh  often finishes with  exit 1 .
The thing is that, in CLI, as opposed to when running backup from exittc, there is no error message.
That's fine for me, but users not familiar with Core might miss the fact that they might have misconfigured their backup.

Maybe this might be useful?
Code: [Select]
-    [ -s /tmp/backup_status ] && exit 1
+    [ -s /tmp/backup_status ] && { echo -e "\nErrors occoured. See /tmp/backup_status" ; exit 1 ; }

.diff attached.
Also removed some white spaces.
Download a copy and keep it handy: Core book ;)