Commit 3190f1de authored by groente's avatar groente
Browse files

moving scripts and logs to sensible directory names as per #15679

parent 761a90d4
......@@ -8,7 +8,7 @@
#
# DJANGO_SETTINGS_MODULE=weblate.settings
# DJANGO_IS_MANAGEMENT_COMMAND=1
# python /var/lib/weblate/repositories/home/save-suggestions.py
# python /var/lib/weblate/scripts/save-suggestions.py
import logging
import logging.config
......
......@@ -21,7 +21,7 @@ args=(sys.stdout,)
class=FileHandler
level=DEBUG
formatter=simpleFormatter
args=('/var/lib/weblate/repositories/home/saveSuggestions.log', 'w')
args=('/var/lib/weblate/logs/saveSuggestions.log', 'w')
[formatter_simpleFormatter]
format=%(asctime)s - %(name)s(%(levelname)s): %(message)s
......
......@@ -6,7 +6,7 @@
cd /usr/local/share/weblate
export DJANGO_SETTINGS_MODULE=weblate.settings
export DJANGO_IS_MANAGEMENT_COMMAND=1
python /var/lib/weblate/repositories/home/save-suggestions.py
python /var/lib/weblate/scripts/save-suggestions.py
cd /var/lib/weblate/repositories/vcs/staging
./build-website --rebuild
......@@ -21,7 +21,7 @@ args=(sys.stdout,)
class=FileHandler
level=DEBUG
formatter=simpleFormatter
args=('/var/lib/weblate/repositories/home/update.log', 'w')
args=('/var/lib/weblate/logs/update.log', 'w')
[formatter_simpleFormatter]
format=%(asctime)s - %(name)s(%(levelname)s): %(message)s
......
......@@ -186,14 +186,31 @@ class tails::weblate (
mode => '2770',
}
file { "${mutable_data_dir}/scripts":
ensure => directory,
owner => root,
group => weblate,
mode => '2770',
}
file { "${mutable_data_dir}/logs":
ensure => directory,
owner => root,
group => weblate,
mode => '2770',
}
# create temporay git repository with all suggestions for stating wiki
# create temporay git repository with all suggestions for stating wiki
# create temporay git repository with all suggestions for stating wiki
file { "${mutable_data_dir}/repositories/home/save-suggestions.py":
file { "${mutable_data_dir}/scripts/save-suggestions.py":
source => 'puppet:///modules/tails/weblate/scripts/save-suggestions.py',
mode => '0700',
owner => weblate,
group => weblate,
}
file { "${mutable_data_dir}/repositories/home/saveSuggestions.conf":
file { "${mutable_data_dir}/scripts/saveSuggestions.conf":
source => 'puppet:///modules/tails/weblate/scripts/saveSuggestions.conf',
mode => '0660',
owner => weblate,
......@@ -201,13 +218,13 @@ class tails::weblate (
}
# script for upgrading git repository in weblate
file { "${mutable_data_dir}/repositories/home/update-weblate-components.py":
file { "${mutable_data_dir}/scripts/update-weblate-components.py":
source => 'puppet:///modules/tails/weblate/scripts/update-weblate-components.py',
mode => '0700',
owner => weblate,
group => weblate;
}
file { "${mutable_data_dir}/repositories/home/updateWeblateComponents.conf":
file { "${mutable_data_dir}/scripts/updateWeblateComponents.conf":
source => 'puppet:///modules/tails/weblate/scripts/updateWeblateComponents.conf',
mode => '0660',
owner => weblate,
......@@ -216,13 +233,13 @@ class tails::weblate (
# Cronjobs
file { "${mutable_data_dir}/repositories/home/suggestions-cronjob.sh":
file { "${mutable_data_dir}/scripts/suggestions-cronjob.sh":
source => 'puppet:///modules/tails/weblate/scripts/suggestions-cronjob.sh',
mode => '0755',
owner => root,
group => root,
}
file { "${mutable_data_dir}/repositories/home/cron.sh":
file { "${mutable_data_dir}/scripts/cron.sh":
source => 'puppet:///modules/tails/weblate/scripts/cron.sh',
mode => '0700',
owner => weblate,
......@@ -230,14 +247,14 @@ class tails::weblate (
}
cron { 'weblate update staging':
command => '/var/lib/weblate/repositories/home/suggestions-cronjob.sh',
command => '/var/lib/weblate/scripts/suggestions-cronjob.sh',
user => weblate,
hour => 3,
minute => 21,
}
cron { 'weblate cronjobs':
command => "cd ${mutable_data_dir}/repositories/home; ./cron.sh",
command => "cd ${mutable_data_dir}/scripts; ./cron.sh",
user => weblate,
minute => 33,
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment