Create registrator role
This commit is contained in:
parent
168641b728
commit
04c7efe706
7 changed files with 174 additions and 0 deletions
12
roles/registrator/files/garaze_racunovodstvo.sh
Normal file
12
roles/registrator/files/garaze_racunovodstvo.sh
Normal file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/sh
|
||||
GARAZEDIR="~/garaze/tmp"
|
||||
# RECIPIENTS="polz@fri.uni-lj.si"
|
||||
# RECIPIENTS="anita.strmole@fri.uni-lj.si"
|
||||
# RECIPIENTS="racunovodstvo@fri.uni-lj.si"
|
||||
RECIPIENTS="$(cat ~/garage_recipients.txt)"
|
||||
|
||||
# cd /home/registrator/siemens-spica-rilec
|
||||
|
||||
rm $GARAZEDIR/*.xlsx
|
||||
~/siemens-spica-rilec/garage_count.py --employee --calculation --format xlsx ~/data "$GARAZEDIR/garaze_{start}_{end}.xlsx"
|
||||
echo "Garaže za pretekli mesec" | mail -s "Garaže za pretekli mesec" "$RECIPIENTS" -A $GARAZEDIR/*.xlsx
|
8
roles/registrator/files/get_siemens_logs.sh
Normal file
8
roles/registrator/files/get_siemens_logs.sh
Normal file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
cd ~/data
|
||||
echo "get -a -p -R /home/siemensfri/*" | sftp -P 2222 spicafri@dioda.fri.uni-lj.si
|
||||
# echo "get -a -p -R /home/siemensfri/*" | sftp -P 2222 spicafri@nebi.fri1.uni-lj.si
|
||||
find ~/data -mtime +365 -exec rm {} \;
|
||||
|
||||
~/siemens-spica-rilec/siemens_to_spool.py 2>> ~/logs/siemens_to_spool.log
|
12
roles/registrator/files/push_siemens_to_spica.sh
Normal file
12
roles/registrator/files/push_siemens_to_spica.sh
Normal file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/sh
|
||||
|
||||
|
||||
/home/registrator/siemens-spica-rilec/spooldirs_from_apis.py
|
||||
/home/registrator/get_siemens_logs.sh 2> /dev/null > /dev/null
|
||||
/home/registrator/siemens-spica-rilec/siemens_to_spool.py 2>> /home/registrator/logs/siemens_to_spool_errors.log
|
||||
|
||||
today=$(date --iso)
|
||||
/home/registrator/siemens-spica-rilec/add_fix.py --time "${today} 23:00" --type "odhod" /home/registrator/spool/*/fixes.csv
|
||||
/home/registrator/siemens-spica-rilec/fix_events.py
|
||||
/home/registrator/siemens-spica-rilec/spool_to_spica.py --commit
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue