#!/bin/bash
. /home/zabbix/.bash_profile

export DAY=$(date '+%a')
export TM=$(date '+%H%M')
export PYTHONPIDS=$(pgrep python3)

if [ $TM == 0000 ]
then
 kill $PYTHONPIDS
 rm $HOME/log/sync_scripts_$DAY.log
fi

logfile=$HOME/log/sync_scripts_$DAY.log


echo "Start" >> $logfile
echo "Time: $(date)" >> $logfile 
echo "$HOME=" $HOME >> $logfile

wget -N -P $HOME/etc/zbxdb_checks/oracle --user=ABS_SLA_REP --password=d7xkBeNdK ftp://ftp.abssolute.net/*.cfg


echo "Stop" >> $logfile
echo "Time: $(date)" >> $logfile

