Skip to content
Snippets Groups Projects
Commit c0878735 authored by Jörg Sachse's avatar Jörg Sachse
Browse files

feat: add new alias reset_all_quarantined_sips

parent c8ba2857
No related branches found
No related tags found
No related merge requests found
...@@ -109,3 +109,4 @@ ...@@ -109,3 +109,4 @@
alias quarantine_summary='echo -e "$( ls ~/.subapp/quarantine/ | wc -l ) SIPs in quarantine.\n"; readarray -d "" sips < <(find ~/.subapp/quarantine -mindepth 1 -maxdepth 1 -print0 -type d); for sip in "${sips[@]}"; do sip="$(basename "${sip}")"; echo "$( du -sh "/mnt/import/${sip}" ),# $( stat -c %y "~/.subapp/quarantine/${sip}/sip.ERROR" ),# $( find "/mnt/import/${sip}/" -type f | wc -l) files"; done | column -s "#" -t' alias quarantine_summary='echo -e "$( ls ~/.subapp/quarantine/ | wc -l ) SIPs in quarantine.\n"; readarray -d "" sips < <(find ~/.subapp/quarantine -mindepth 1 -maxdepth 1 -print0 -type d); for sip in "${sips[@]}"; do sip="$(basename "${sip}")"; echo "$( du -sh "/mnt/import/${sip}" ),# $( stat -c %y "~/.subapp/quarantine/${sip}/sip.ERROR" ),# $( find "/mnt/import/${sip}/" -type f | wc -l) files"; done | column -s "#" -t'
alias next='/usr/bin/perl -I /usr/local/perl/ /usr/local/bin/subapp_bagit.pl --config-file /home/processing/.subapp/subapp.cfg --single_run; echo "################# LOG #####################"; echo "last 10 lines..."; tail -n 10 /var/log/subapp/sips.log; echo "################# PROBLEMS #####################"; START=$( grep -n "starting..." /var/log/subapp/subapp.log | tail -1 | cut -f1 -d: ); ALL_LINES=$( wc -l < /var/log/subapp/subapp.log ); let LINES=$ALL_LINES-$START; echo "checking last $LINES log lines..."; tail -n $LINES /var/log/subapp/subapp.log | grep --color -e "\[ERROR\]" -e "\[FATAL\]" -e "\[WARN\]"' alias next='/usr/bin/perl -I /usr/local/perl/ /usr/local/bin/subapp_bagit.pl --config-file /home/processing/.subapp/subapp.cfg --single_run; echo "################# LOG #####################"; echo "last 10 lines..."; tail -n 10 /var/log/subapp/sips.log; echo "################# PROBLEMS #####################"; START=$( grep -n "starting..." /var/log/subapp/subapp.log | tail -1 | cut -f1 -d: ); ALL_LINES=$( wc -l < /var/log/subapp/subapp.log ); let LINES=$ALL_LINES-$START; echo "checking last $LINES log lines..."; tail -n $LINES /var/log/subapp/subapp.log | grep --color -e "\[ERROR\]" -e "\[FATAL\]" -e "\[WARN\]"'
alias reset_all_quarantined_sips='subapp --reset_failed_preingests $(readarray -d "" sips < <(find ~/.subapp/quarantine -mindepth 1 -maxdepth 1 -print0 -type d); for sip in "${sips[@]}"; do sip="$(basename "${sip}")"; echo "/mnt/import/${sip}"; done | tr "\n" " ")'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment