Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Tyagov
slapos
Commits
77b3535d
Commit
77b3535d
authored
Nov 14, 2022
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caddy-frontend: Consistently use software provided find
parent
55b3f456
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
20 additions
and
16 deletions
+20
-16
software/caddy-frontend/buildout.hash.cfg
software/caddy-frontend/buildout.hash.cfg
+5
-5
software/caddy-frontend/instance-frontend.cfg.in
software/caddy-frontend/instance-frontend.cfg.in
+7
-3
software/caddy-frontend/instance-kedifa.cfg.in
software/caddy-frontend/instance-kedifa.cfg.in
+2
-2
software/caddy-frontend/instance-master.cfg.in
software/caddy-frontend/instance-master.cfg.in
+1
-1
software/caddy-frontend/software.cfg
software/caddy-frontend/software.cfg
+1
-1
software/caddy-frontend/templates/rotate-script.sh.in
software/caddy-frontend/templates/rotate-script.sh.in
+3
-3
software/caddy-frontend/templates/validate-script.sh.in
software/caddy-frontend/templates/validate-script.sh.in
+1
-1
No files found.
software/caddy-frontend/buildout.hash.cfg
View file @
77b3535d
...
...
@@ -22,11 +22,11 @@ md5sum = 5784bea3bd608913769ff9a8afcccb68
[profile-frontend]
filename = instance-frontend.cfg.in
md5sum =
65f33cc28372cb7fea61c27b81b6e5f1
md5sum =
1ec349747487b45dd6b30bb2aa45acbe
[profile-master]
filename = instance-master.cfg.in
md5sum =
2c599c22f6ab9bf2bbc48da8a12ae6e0
md5sum =
50dbd9bd25fbc608b576ac83f4e13b0f
[profile-slave-list]
filename = instance-slave-list.cfg.in
...
...
@@ -82,7 +82,7 @@ md5sum = 905e395b67c0a2b214b9f0099c8dc939
[template-validate-script]
_update_hash_filename_ = templates/validate-script.sh.in
md5sum =
53e5d7ba2827bff003051f74f24ffe4f
md5sum =
ffa38c0110cf7a91cfc514e013b37a6d
[template-configuration-state-script]
_update_hash_filename_ = templates/configuration-state-script.sh.in
...
...
@@ -90,7 +90,7 @@ md5sum = f494ce78550847066ed5a72c54ef47a9
[template-rotate-script]
_update_hash_filename_ = templates/rotate-script.sh.in
md5sum =
8c150e1e6c993708d31936742f3a7302
md5sum =
b6fda7e51b6847199c3d142fc3f9a671
[software-setup]
filename = setup.py
...
...
@@ -102,7 +102,7 @@ md5sum = e82ccdb0b26552a1c88ff523d8fae24a
[profile-kedifa]
filename = instance-kedifa.cfg.in
md5sum =
40fe46a1fe653406b18ca46351d195b8
md5sum =
d790e23ebf7b07bb245322629d402551
[template-backend-haproxy-rsyslogd-conf]
_update_hash_filename_ = templates/backend-haproxy-rsyslogd.conf.in
...
...
software/caddy-frontend/instance-frontend.cfg.in
View file @
77b3535d
...
...
@@ -644,6 +644,7 @@ pattern = *.old
keep_days = 365
extra-context =
raw find_executable {{ software_parameter_dict['findutils'] }}/bin/find
key log_dir trafficserver-directory:log
key rotate_dir trafficserver-directory:logrotate-backup
key xz_binary :xz_binary
...
...
@@ -670,7 +671,7 @@ sha256sum = {{ software_parameter_dict['sha256sum'] }}
extra-context =
import os_module os
raw find_executable {{ software_parameter_dict['find
'] }}
raw find_executable {{ software_parameter_dict['find
utils'] }}/bin/find
key path_list :path_list
key sha256sum :sha256sum
key signature_file :signature_file
...
...
@@ -699,6 +700,7 @@ output = ${directory:bin}/frontend-caddy-validate
last_state_file = ${directory:run}/caddy_configuration_last_state
validate_command = ${caddy-wrapper:output} -validate
extra-context =
raw find_executable {{ software_parameter_dict['findutils'] }}/bin/find
key validate_command :validate_command
key configuration_state_command frontend-caddy-configuration-state-validate:output
key last_state_file :last_state_file
...
...
@@ -835,7 +837,7 @@ sha256sum = {{ software_parameter_dict['sha256sum'] }}
extra-context =
import os_module os
raw find_executable {{ software_parameter_dict['find
'] }}
raw find_executable {{ software_parameter_dict['find
utils'] }}/bin/find
key path_list :path_list
key sha256sum :sha256sum
key signature_file :signature_file
...
...
@@ -864,6 +866,7 @@ output = ${directory:bin}/backend-haproxy-validate
last_state_file = ${directory:run}/backend_haproxy_configuration_last_state
validate_command = {{ software_parameter_dict['haproxy_executable'] }} -f ${backend-haproxy-configuration:file} -c
extra-context =
raw find_executable {{ software_parameter_dict['findutils'] }}/bin/find
key validate_command :validate_command
key configuration_state_command backend-haproxy-configuration-state-validate:output
key last_state_file :last_state_file
...
...
@@ -1006,7 +1009,7 @@ sha256sum = {{ software_parameter_dict['sha256sum'] }}
extra-context =
import os_module os
raw find_executable {{ software_parameter_dict['find
'] }}
raw find_executable {{ software_parameter_dict['find
utils'] }}/bin/find
key path_list :path_list
key sha256sum :sha256sum
key signature_file :signature_file
...
...
@@ -1035,6 +1038,7 @@ output = ${directory:bin}/slave-introspection-validate
last_state_file = ${directory:run}/slave_introspection_configuration_last_state
validate_command = {{ software_parameter_dict['nginx'] }} -c ${frontend-configuration:slave-introspection-configuration} -t
extra-context =
raw find_executable {{ software_parameter_dict['findutils'] }}/bin/find
key validate_command :validate_command
key configuration_state_command slave-introspection-configuration-state-validate:output
key last_state_file :last_state_file
...
...
software/caddy-frontend/instance-kedifa.cfg.in
View file @
77b3535d
...
...
@@ -288,7 +288,7 @@ directory = ${directory:auth-ready}
init =
import os
if os.path.isdir(options['directory']):
os.system("find %s -type f -name *-auth-random -size 0 -delete" % (options['directory'],))
os.system("
{{ software_parameter_dict['findutils'] }}/bin/
find %s -type f -name *-auth-random -size 0 -delete" % (options['directory'],))
[auth-random]
recipe = slapos.recipe.build
...
...
@@ -335,7 +335,7 @@ config-command =
recipe = plone.recipe.command
output = ${directory:var}/${:_buildout_section_name_}.txt
update-command = ${:command}
command = find ${directory:auth-ready} -type f > ${:output}
command =
{{ software_parameter_dict['findutils'] }}/bin/
find ${directory:auth-ready} -type f > ${:output}
[promise-kedifa-auth-ready]
<= monitor-promise-base
...
...
software/caddy-frontend/instance-master.cfg.in
View file @
77b3535d
...
...
@@ -856,7 +856,7 @@ key = ${:certificate}
stop-on-error = True
update-command = ${:command}
command =
[ -f ${:certificate} ] && find ${:certificate} -type f -mtime +3 -delete
[ -f ${:certificate} ] &&
{{ software_parameter_dict['findutils'] }}/bin/
find ${:certificate} -type f -mtime +3 -delete
if ! [ -f ${:certificate} ] ; then
openssl req -new -newkey rsa:2048 -sha256 -subj \
"/CN=${rejected-slave-publish-configuration:ip}" \
...
...
software/caddy-frontend/software.cfg
View file @
77b3535d
...
...
@@ -126,7 +126,7 @@ xz_location = ${xz-utils:location}
htpasswd = ${:bin_directory}/htpasswd
smart_caucase_signer = ${:bin_directory}/smart-caucase-signer
caucase_csr_sign_check = ${:bin_directory}/caucase-csr-sign-check
find
= ${findutils:location}/bin/find
find
utils = ${findutils:location}
[template]
recipe = slapos.recipe.template:jinja2
...
...
software/caddy-frontend/templates/rotate-script.sh.in
View file @
77b3535d
...
...
@@ -9,10 +9,10 @@ COMPRESS={{ xz_binary }}
KEEP_DAYS
={{
keep_days
}}
# Move out ${PATTERN} files
find
${
LOG_DIR
}
-maxdepth
1
-type
f
-name
${
PATTERN
}
-exec
mv
{}
${
LOGROTATE_DIR
}
/
\;
{{
find_executable
}}
${
LOG_DIR
}
-maxdepth
1
-type
f
-name
${
PATTERN
}
-exec
mv
{}
${
LOGROTATE_DIR
}
/
\;
# Compress
find
${
LOGROTATE_DIR
}
-maxdepth
1
-type
f
-name
${
PATTERN
}
-exec
${
COMPRESS
}
-9
{}
\;
{{
find_executable
}}
${
LOGROTATE_DIR
}
-maxdepth
1
-type
f
-name
${
PATTERN
}
-exec
${
COMPRESS
}
-9
{}
\;
# Retent old files
find
${
LOGROTATE_DIR
}
-maxdepth
1
-type
f
-mtime
+
${
KEEP_DAYS
}
-delete
{{
find_executable
}}
${
LOGROTATE_DIR
}
-maxdepth
1
-type
f
-mtime
+
${
KEEP_DAYS
}
-delete
software/caddy-frontend/templates/validate-script.sh.in
View file @
77b3535d
...
...
@@ -7,7 +7,7 @@ LAST_STATE_FILE={{ last_state_file }}
# force validation each 2 hours
old_found
=
1
if
[
-f
$LAST_STATE_FILE
]
;
then
old_found
=
$(
find
$LAST_STATE_FILE
-mmin
+120 |
wc
-l
)
old_found
=
$(
{{
find_executable
}}
$LAST_STATE_FILE
-mmin
+120 |
wc
-l
)
fi
if
[
"
$old_found
"
-eq
1
]
||
{{
configuration_state_command
}}
;
then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment