...
Пример для запуска с сервера приложения (строго для версий 21.8+), если полный путь к утилите /opt/updater:
Без форматирования |
---|
00 21 * * 6 cd /opt/updater && . /opt/updater/updater.env && /opt/updater/download-dictionaries.sh
00 01 * * 0 cd /opt/updater && . /opt/updater/updater.env && /opt/updater/env/bin/fab update suggestions_bank
05 01 * * 0 cd /opt/updater && . update-dictionaries.sh |
Блок кода |
---|
language | bash |
---|
title | /opt/updater/download-dictionaries.sh |
---|
|
updater.env && /opt/updater/env/bin/fab updatedownload suggestions_ip
10 01 * * 0 cd bank
/opt/updater && . /opt/updater/updater.env && /env/bin/fab download suggestions_ip
/opt/updater/env/bin/fab updatedownload suggestions_address
30 02 * * 0 cd /opt/updater && . /opt/updater/updater.env && /env/bin/fab download suggestions_geo
/opt/updater/env/bin/fab updatedownload suggestions_geo
35 02 * * 0 cd house
/opt/updater && . /opt/updater/updater.env && /env/bin/fab download suggestions_iso3166
/opt/updater/env/bin/fab updatedownload suggestions_geonames
40 02 * * 0 cd /opt/updater && . /opt/updater/updater.env && /env/bin/fab download suggestions_osm
/opt/updater/env/bin/fab updatedownload suggestions_osm
00 03 * * 0 cd party
/opt/updater && . /opt/updater/updater.env && /env/bin/fab download suggestions_partyext
/opt/updater/env/bin/fab updatedownload suggestions_partyext update suggestions_party
00 04 * * 0 cd email
/opt/updater && . /opt/updater/updater.env && /env/bin/fab download suggestions_fio
/opt/updater/env/bin/fab updatedownload factor_geocode
30 04 * * 0 cd /opt/updater && . /opt/updater/updater.env && /opt/updater/env/bin/fab updatedownload factor_fias |
Блок кода |
---|
language | bash |
---|
title | /opt/updater/downloadupdate-dictionaries.sh |
---|
|
/opt/updater/env/bin/fab downloadupdate suggestions_bank
/opt/updater/env/bin/fab downloadupdate suggestions_ip
/opt/updater/env/bin/fab downloadupdate suggestions_address
/opt/updater/env/bin/fab downloadupdate suggestions_geoflat
/opt/updater/env/bin/fab downloadupdate suggestions_geonamesstead
/opt/updater/env/bin/fab downloadupdate suggestions_osmgeonames
/opt/updater/env/bin/fab downloadupdate suggestions_partyosm
/opt/updater/env/bin/fab downloadupdate suggestions_partyextparty
/opt/updater/env/bin/fab downloadupdate suggestions_email
/opt/updater/env/bin/fab downloadupdate suggestions_fio
/opt/updater/env/bin/fab downloadupdate factor_geocode
/opt/updater/env/bin/fab downloadupdate factor_fias |
Пример для запуска с внешней машины , если полный (строго для версий 21.8+), если полный путь к утилите /opt/updater, а 10.0.1.34 — адрес сервера приложения:
Без форматирования |
---|
00 21 * * 6 cd /opt/updater && . /opt/updater/updater.env && /opt/updater/download-dictionaries.sh
00 23 * * 6 cd /opt/updater && . /opt/updater/updater.env && /opt/updater/copy-dictionaries.sh
00 01 * * 0 cd /opt/updater && . /opt/updater/updater.env && /opt/updater/update-dictionaries.sh |
Блок кода |
---|
language | bash |
---|
title | /opt/updater/download-dictionaries.sh |
---|
|
/opt/updater/env/bin/fab -H 10.0.1.34 update download-to suggestions_bank
05 01 * * 0 cd /opt/updater && . /opt/updater/updater.env && tmp/dictionaries/suggestions_bank
/opt/updater/env/bin/fab -H 10.0.1.34 updatedownload-to suggestions_ip
10 01 * * 0 cd /opt/updater && . /opt/updater/updater.env && tmp/dictionaries/suggestions_ip
/opt/updater/env/bin/fab download-H 10.0.1.34 update to suggestions_address /tmp/dictionaries/suggestions_address
30 02 * * 0 cd /opt/updater && . /opt/updater/updater.env && /env/bin/fab download-to suggestions_geo /tmp/dictionaries/suggestions_geo
/opt/updater/env/bin/fab download-H 10.0.1.34 update suggestions_geo
35 02 * * 0 cd to suggestions_house /tmp/dictionaries/suggestions_house
/opt/updater && . /opt/updater/updater.env && /env/bin/fab download-to suggestions_iso3166 /tmp/dictionaries/suggestions_iso3166
/opt/updater/env/bin/fab download-H 10.0.1.34 update to suggestions_geonames /tmp/dictionaries/suggestions_geonames
40 02 * * 0 cd /opt/updater && . /opt/updater/updater.env && /env/bin/fab download-to suggestions_osm /tmp/dictionaries/suggestions_osm
/opt/updater/env/bin/fab download-H 10.0.1.34 update suggestions_osm
00 03 * * 0 cd to suggestions_party /tmp/dictionaries/suggestions_party
/opt/updater && . /opt/updater/updater.env && /env/bin/fab download-to suggestions_partyext /tmp/dictionaries/suggestions_partyext
/opt/updater/env/bin/fab -H 10.0.1.34 updatedownload-to suggestions_partyext update email /tmp/dictionaries/suggestions_party
00 04 * * 0 cd email
/opt/updater && . /opt/updater/updater.env && /env/bin/fab download-to suggestions_fio /tmp/dictionaries/suggestions_fio
/opt/updater/env/bin/fab -H 10.0.1.34 update download-to factor_geocode
30 04 * * 0 cd /opt/updater && . /opt/updater/updater.env && /tmp/dictionaries/factor_geocode
/opt/updater/env/bin/fab download-H 10.0.1.34 update to factor_fias /tmp/dictionaries/factor_fias |
Блок кода |
---|
language | bash |
---|
title | /opt/updater/downloadcopy-dictionaries.sh |
---|
|
SERVER="10.0.1.34"
/opt/updater/env/bin/fab download-toH $SERVER scp suggestions_bank /tmp/dictionaries/suggestions_bank
/opt/updater/env/bin/fab download-toH $SERVER scp suggestions_ip /tmp/dictionaries/suggestions_ip
/opt/updater/env/bin/fab download-toH $SERVER scp suggestions_address /tmp/dictionaries/suggestions_address
/opt/updater/env/bin/fab download-toH $SERVER scp suggestions_geo /tmp/dictionaries/suggestions_geo
/opt/updater/env/bin/fab download-toH $SERVER scp suggestions_geonames /tmp/dictionaries/suggestions_geonames
/opt/updater/env/bin/fab download-toH $SERVER scp suggestions_osm /tmp/dictionaries/suggestions_osm
/opt/updater/env/bin/fab download-toH $SERVER scp suggestions_party /tmp/dictionaries/suggestions_party
/opt/updater/env/bin/fab download-toH $SERVER scp suggestions_partyext /tmp/dictionaries/suggestions_partyext
/opt/updater/env/bin/fab download-toH $SERVER scp suggestions_email /tmp/dictionaries/suggestions_email
/opt/updater/env/bin/fab download-toH $SERVER scp suggestions_fio /tmp/dictionaries/suggestions_fio
/opt/updater/env/bin/fab download-toH $SERVER scp factor_geocode /tmp/dictionaries/factor_geocode
/opt/updater/env/bin/fab download-toH $SERVER scp factor_fias /tmp/dictionaries/factor_fias |
Блок кода |
---|
language | bash |
---|
title | /opt/updater/copyupdate-dictionaries.sh |
---|
|
SERVER="10.0.1.34"
/opt/updater/env/bin/fab -H $SERVER scp suggestions_bank /tmp/dictionaries/update suggestions_bank
/opt/updater/env/bin/fab -H $SERVER scp suggestions_ip /tmp/dictionaries/update suggestions_ip
/opt/updater/env/bin/fab -H $SERVER scp suggestions_address /tmp/dictionaries/update suggestions_address
/opt/updater/env/bin/fab -H $SERVER scpupdate suggestions_geo /tmp/dictionaries/suggestions_geoflat
/opt/updater/env/bin/fab -H $SERVER scpupdate suggestions_geonames /tmp/dictionaries/suggestions_geonamesstead
/opt/updater/env/bin/fab -H $SERVER scpupdate suggestions_osm /tmp/dictionaries/suggestions_osmgeonames
/opt/updater/env/bin/fab -H $SERVER scpupdate suggestions_party /tmp/dictionaries/suggestions_partyosm
/opt/updater/env/bin/fab -H $SERVER scpupdate suggestions_partyext /tmp/dictionaries/suggestions_partyextparty
/opt/updater/env/bin/fab -H $SERVER scpupdate suggestions_email /tmp/dictionaries/suggestions_email
/opt/updater/env/bin/fab -H $SERVER scp suggestions_fio /tmp/dictionaries/update suggestions_fio
/opt/updater/env/bin/fab -H $SERVER scpupdate factor_geocode /tmp/dictionaries/factor_geocode
/opt/updater/env/bin/fab -H $SERVER scp factor_fias /tmp/dictionaries/update factor_fias |