Linux shell exit code or last message
Posted: 05 Jun 2020, 11:37
Does FileBot have an exit code or last error message we can access?
I ask because sometimes it fails during an operation and my normal push notification just has "done".
It would be good if I could add say, the last line of the output or an exit code to my Pushover notification.
e.g.
Error
Notification
python /usr/bin/pushover-cli --quiet "$t ...done with exit code `echo $?`" "FileBot"
Thanks,
Paully
I ask because sometimes it fails during an operation and my normal push notification just has "done".
It would be good if I could add say, the last line of the output or an exit code to my Pushover notification.
e.g.
Error
Code: Select all
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f9231686d33, pid=26631, tid=0x00007f9248f7c700
#
# JRE version: OpenJDK Runtime Environment (8.0_252-b09) (build 1.8.0_252-8u252-b09-1~16.04-b09)
# Java VM: OpenJDK 64-Bit Server VM (25.252-b09 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# J 1876 C1 groovyjarjarantlr4.v4.runtime.atn.ParserATNSimulator.addDFAState(Lgroovyjarjarantlr4/v4/runtime/dfa/DFA;Lgroovyjarjarantlr4/v4/runtime/atn/ATNConfigSet;Lgroovyjarjarantlr4/v4/runtime/atn/PredictionContextCache;)Lgroovyjarjarantlr4/v4/runtime/dfa/DFAState; (226 bytes) @ 0x00007f9231686d33 [0x00007f9231684a20+0x2313]
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/paully/Downloads/seedbox2/completed/hs_err_pid26631.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
Aborted
python /usr/bin/pushover-cli --quiet "$t ...done with exit code `echo $?`" "FileBot"
Code: Select all
$ command1 2> error.log
Paully
Code: Select all
FileBot 4.9.1 (r7372) JDK8
JNA Native: 4.0.1
MediaInfo: 20.03.20200411
p7zip: p7zip Version 9.20 (locale=en_GB.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)
unrar: UNRAR 5.30 beta 2 freeware
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2020-05-22 (r644)
Groovy: 3.0.3
JRE: OpenJDK Runtime Environment 1.8.0_252
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 4 Core / 3.7 GB Max Memory / 74 MB Used Memory
OS: Linux (amd64)
HW: Linux nas 4.15.0-15-generic #16~16.04.1-Ubuntu SMP Thu Apr 5 12:19:23 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
DATA: /home/paully/.filebot
Package: DEB
License: FileBot License (Valid-Until: 2020-07-31)
Done ヾ(@⌒ー⌒@)ノ