Dump customer datastructure for statistics logic to be transferred to script1.
This commit is contained in:
parent
d597ec106a
commit
28b6584a6c
|
@ -55,6 +55,13 @@ class sunetdrive::multinode_db(){
|
||||||
group => 'root',
|
group => 'root',
|
||||||
mode => '0700',
|
mode => '0700',
|
||||||
}
|
}
|
||||||
|
file {'/opt/mariadb/statistics/custdata.json':
|
||||||
|
ensure => file,
|
||||||
|
content => template('sunetdrive/mariadb/custconfig.json.erb'),
|
||||||
|
owner => 'root',
|
||||||
|
group => 'root',
|
||||||
|
mode => '0600',
|
||||||
|
}
|
||||||
sunet::scriptherder::cronjob { 'genuserdeplists':
|
sunet::scriptherder::cronjob { 'genuserdeplists':
|
||||||
cmd => '/root/tasks/genusersondepartmentlists.sh',
|
cmd => '/root/tasks/genusersondepartmentlists.sh',
|
||||||
hour => '2',
|
hour => '2',
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
<% basedir="statistics:drive-server-coms" -%>
|
<% basedir="statistics:drive-server-coms" -%>
|
||||||
<% cupath="/opt/mariadb/statistics/users/" -%>
|
<% cupath="/opt/mariadb/statistics/users/" -%>
|
||||||
|
<% custdata="/opt/mariadb/statistics/custdata.json" -%>
|
||||||
status=0
|
status=0
|
||||||
|
|
||||||
<% @custdata.each do |cust,data| -%>
|
<% @custdata.each do |cust,data| -%>
|
||||||
|
@ -23,4 +24,9 @@ fi
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
|
if [[ -f <%= custdata %> ]]
|
||||||
|
then
|
||||||
|
timeout 30s rclone copy -c --no-check-certificate --webdav-headers "Host,sunet.drive.sunet.se" --use-cookies <%= custdata %> <%= basedir%>/
|
||||||
|
fi
|
||||||
|
|
||||||
exit ${status}
|
exit ${status}
|
||||||
|
|
Loading…
Reference in a new issue