22 lines
665 B
Bash
Executable File
22 lines
665 B
Bash
Executable File
#!/bin/bash
|
|
DATER=`date +%b%_3d%_9T`
|
|
echo $DATER IPointlog: starting procedure
|
|
FILES=`/usr/bin/find /opt/sap -maxdepth 1 -name "*txt" -type f | /usr/bin/wc -l`
|
|
if [ $FILES -eq 0 ]; then
|
|
echo $DATER IPointlog: Nothing to do
|
|
echo $DATER IPointlog: terminated with error 2
|
|
exit 2
|
|
fi
|
|
|
|
|
|
#mount | grep "/opt/sap/remote" /etc/mtab > /dev/null
|
|
#if [ $? -ne 0 ]; then
|
|
if !(smbmount //172.41.3.8/ELA /opt/sap/remote -o user=ela,pass=matstamm ,dom=LANDHOF) then
|
|
echo $DATER IPointlog: mount failed: could not mount remote share
|
|
echo $DATER IPointlog: terminated with error 1
|
|
exit 1
|
|
fi
|
|
|
|
mv /opt/sap/20*.txt /opt/sap/remote/IPOINTLOG
|
|
/bin/umount /opt/sap/remote
|