forked from URZ/admin-tools
[REMOVE] Move Tivoli Script to tsm-client-urz package
This commit is contained in:
@@ -1,20 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -ou pipefail
|
|
||||||
|
|
||||||
LASTRUN="/var/lib/runtime/$(basename "$0" .sh).lastrun"
|
|
||||||
|
|
||||||
if [[ $(pgrep -c "$(basename "$0" .sh)" ) -gt 1 ]]; then
|
|
||||||
echo "Script already running. Abort!" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
/usr/bin/dsmc inc >> /var/log/tivoli/tsm.log 2>&1
|
|
||||||
DSMCRETURN=$?
|
|
||||||
if [[ "$DSMCRETURN" -ne 0 && "$DSMCRETURN" -ne 8 ]]; then
|
|
||||||
echo "Error during dsmc execution occurred." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
date +%s > "$LASTRUN"
|
|
||||||
exit 0
|
|
||||||
Reference in New Issue
Block a user