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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
slapos
Commits
88a3d3ae
Commit
88a3d3ae
authored
Oct 04, 2023
by
Boxiang Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
temp fixup
parent
332604e9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
software/matomo/buildout.hash.cfg
software/matomo/buildout.hash.cfg
+2
-2
software/matomo/matomo-instance.cfg.in
software/matomo/matomo-instance.cfg.in
+1
-1
software/matomo/promise/check_cron_service.py
software/matomo/promise/check_cron_service.py
+3
-3
No files found.
software/matomo/buildout.hash.cfg
View file @
88a3d3ae
...
...
@@ -15,7 +15,7 @@
[template-matomo-instance]
filename = matomo-instance.cfg.in
md5sum = 6
5fe09694eac010a8c58ba3416ccc98f
md5sum = 6
b681b0ba74ed68ca18e36ff6a18f19d
[template-matomo-backup.sh]
filename = matomo-backup.sh.in
...
...
@@ -27,4 +27,4 @@ md5sum = 291a70f3809aa6c7338f34c4bac36577
[custom-promise]
filename = promise/check_cron_service.py
md5sum = f
93a23c08c4f6b864e931c7b4e767a0c
md5sum = f
6c51545dd52dedff27635da2216b9ba
software/matomo/matomo-instance.cfg.in
View file @
88a3d3ae
...
...
@@ -11,7 +11,7 @@ cron-entries = ${cron:cron-entries}
name = matomo-backup
frequency = * * * * *
log-file = ${directory:log}/matomo-backup.log
command = ${matomo-backup.sh:output}
2>&1 | ${xxx.sh:output}
> ${:log-file}
command = ${matomo-backup.sh:output}
; echo $?
> ${:log-file}
[matomo-backup.sh]
recipe = slapos.recipe.template:jinja2
...
...
software/matomo/promise/check_cron_service.py
View file @
88a3d3ae
...
...
@@ -30,7 +30,7 @@ class RunPromise(GenericPromise):
if
not
os
.
path
.
isfile
(
cron_log_path
):
self
.
logger
.
error
(
"cron_log %s does not exist or is not a file"
,
cron_log_path
)
target_string
=
"
exit
1"
target_string
=
"1"
partition_path
=
self
.
getConfig
(
'partition_path'
)[:
-
3
]
cron_service_name
=
self
.
getConfig
(
'cron_name'
)
...
...
@@ -59,8 +59,8 @@ class RunPromise(GenericPromise):
try
:
with
open
(
cron_log_file
,
"r"
)
as
file
:
log_content
=
file
.
read
()
if
"
exit 1"
in
log_content
:
self
.
logger
.
error
(
f"Cron service
{
cron_service_name
}
failed:
{
log_content
}
"
)
if
"
0"
not
in
log_content
:
self
.
logger
.
error
(
f"Cron service
{
cron_service_name
}
failed
with the code
:
{
log_content
}
"
)
print
(
log_content
)
except
FileNotFoundError
:
print
(
f"File not found:
{
cron_log_file
}
"
)
...
...
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