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
Ophélie Gagnard
slapos
Commits
fc0cfd30
Commit
fc0cfd30
authored
Apr 05, 2022
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Plain Diff
Update Release Candidate
parents
27cc9ac2
320639dd
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
66 additions
and
25 deletions
+66
-25
component/diffutils/buildout.cfg
component/diffutils/buildout.cfg
+16
-0
component/serf/buildout.cfg
component/serf/buildout.cfg
+2
-1
software/matomo/buildout.hash.cfg
software/matomo/buildout.hash.cfg
+2
-2
software/matomo/matomo-backup.sh.in
software/matomo/matomo-backup.sh.in
+31
-14
software/matomo/matomo-instance.cfg.in
software/matomo/matomo-instance.cfg.in
+3
-4
software/matomo/software.cfg
software/matomo/software.cfg
+12
-4
No files found.
component/diffutils/buildout.cfg
0 → 100644
View file @
fc0cfd30
[buildout]
extends =
../xz-utils/buildout.cfg
parts =
diffutils
[diffutils]
recipe = slapos.recipe.cmmi
shared = true
url = https://ftp.gnu.org/gnu/diffutils/diffutils-3.8.tar.xz
md5sum = 6a6b0fdc72acfe3f2829aab477876fbc
environment =
PATH=${xz-utils:location}/bin:%(PATH)s
component/serf/buildout.cfg
View file @
fc0cfd30
...
@@ -5,6 +5,7 @@ extends =
...
@@ -5,6 +5,7 @@ extends =
../apache/buildout.cfg
../apache/buildout.cfg
../util-linux/buildout.cfg
../util-linux/buildout.cfg
../openssl/buildout.cfg
../openssl/buildout.cfg
../python-2.7/buildout.cfg
../zlib/buildout.cfg
../zlib/buildout.cfg
[serf]
[serf]
...
@@ -13,7 +14,7 @@ shared = true
...
@@ -13,7 +14,7 @@ shared = true
url = https://archive.apache.org/dist/serf/serf-1.3.9.tar.bz2
url = https://archive.apache.org/dist/serf/serf-1.3.9.tar.bz2
md5sum = 370a6340ff20366ab088012cd13f2b57
md5sum = 370a6340ff20366ab088012cd13f2b57
scons-command =
scons-command =
python ${scons:location}/scons.py \
${python2.7:location}/bin/
python ${scons:location}/scons.py \
APR="${apr:location}" \
APR="${apr:location}" \
APU="${apr-util:location}" \
APU="${apr-util:location}" \
OPENSSL="${openssl:location}" \
OPENSSL="${openssl:location}" \
...
...
software/matomo/buildout.hash.cfg
View file @
fc0cfd30
...
@@ -19,8 +19,8 @@ md5sum = 9940e05d5e624a7884f4e6e062355798
...
@@ -19,8 +19,8 @@ md5sum = 9940e05d5e624a7884f4e6e062355798
[template-matomo-instance]
[template-matomo-instance]
filename = matomo-instance.cfg.in
filename = matomo-instance.cfg.in
md5sum =
cd5d8b83fef478b2fbb4ccc9489f47ed
md5sum =
34925db56b5f97e5a29080fb83fbefa8
[template-matomo-backup.sh]
[template-matomo-backup.sh]
filename = matomo-backup.sh.in
filename = matomo-backup.sh.in
md5sum =
d11e34a576e580d4253fbe787f85e5cc
md5sum =
fb29ad59813ef62c3f5934d4a0d90e14
software/matomo/matomo-backup.sh.in
View file @
fc0cfd30
#!/bin/
ba
sh
#!/bin/sh
set
-e
set
-e
set
-x
set
-x
...
@@ -13,20 +13,37 @@ if [ ! -f {{ parameter_dict['document-root'] }}/matomo/config/config.ini.php ];
...
@@ -13,20 +13,37 @@ if [ ! -f {{ parameter_dict['document-root'] }}/matomo/config/config.ini.php ];
exit
0
;
exit
0
;
fi
fi
#create plugins backup file
trap
'rm -rf "$TMPFILE"'
EXIT TERM INT
touch
{{
parameter_dict[
'dir-backup'
]
}}
/plugins_list
#remove backup file before
#we reserve backup folder in a month
if
[
-d
{{
parameter_dict[
'dir-backup'
]
}}
/config
]
;
then
{{
parameter_dict[
'find-bin'
]
}}
/bin/find
{{
parameter_dict[
'dir-backup'
]
}}
-mtime
+30
-type
d |
{{
parameter_dict[
'find-bin'
]
}}
/bin/xargs
rm
-rf
rm
-rf
{{
parameter_dict[
'dir-backup'
]
}}
/config
#backup
TMPFILE
=
$(
mktemp
-d
-p
"{{ parameter_dict['dir-backup'] }}"
)
{{
php_bin
}}
{{
parameter_dict[
'document-root'
]
}}
/matomo/console plugin:list
>
$TMPFILE
/plugins_list
cp
-rf
{{
parameter_dict[
'document-root'
]
}}
/matomo/config
$TMPFILE
/config
cp
-rf
{{
parameter_dict[
'document-root'
]
}}
/matomo/plugins
$TMPFILE
/plugins
#check if copy-action finish well
if
test
!
-z
"
$(
{{
parameter_dict[
'diff-bin'
]
}}
/bin/diff
-r
$TMPFILE
/config
{{
parameter_dict[
'document-root'
]
}}
/matomo/config
)
"
;
then
exit
1
fi
fi
if
[
-d
{{
parameter_dict[
'dir-backup'
]
}}
/plugins
]
;
then
if
test
!
-z
"
$(
{{
parameter_dict[
'diff-bin'
]
}}
/bin/diff
-r
$TMPFILE
/plugins
{{
parameter_dict[
'document-root'
]
}}
/matomo/plugins
)
"
;
then
rm
-rf
{{
parameter_dict[
'dir-backup'
]
}}
/plugins
exit
1
fi
#check if the file plugins_list has been created
if
[
!
-f
$TMPFILE
/plugins_list
]
;
then
exit
1
fi
#if all things go well, change the name of folder with date now
if
[
-d
$TMPFILE
]
;
then
mv
-f
$TMPFILE
{{
parameter_dict[
'dir-backup'
]
}}
/
`
date
+%m-%d-%Y-%T
`
fi
fi
#backup
{{
php_bin
}}
{{
parameter_dict[
'document-root'
]
}}
/matomo/console plugin:list
>
{{
parameter_dict[
'dir-backup'
]
}}
/plugins_list
cp
-rf
{{
parameter_dict[
'document-root'
]
}}
/matomo/config
{{
parameter_dict[
'dir-backup'
]
}}
cp
-rf
{{
parameter_dict[
'document-root'
]
}}
/matomo/plugins
{{
parameter_dict[
'dir-backup'
]
}}
exit
0
exit
0
software/matomo/matomo-instance.cfg.in
View file @
fc0cfd30
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
[instance-parameter]
[instance-parameter]
matomo = ${:document-root}
matomo = ${:document-root}
dir-backup = ${directory:backup}
dir-backup = ${directory:backup}
find-bin = {{ findutils_location }}
diff-bin = {{ diffutils_location }}
#php.ini parameters
#php.ini parameters
php.memory_limit = 512M
php.memory_limit = 512M
...
@@ -40,9 +42,6 @@ rendered = ${directory:scripts}/matomo-backup
...
@@ -40,9 +42,6 @@ rendered = ${directory:scripts}/matomo-backup
context =
context =
section parameter_dict instance-parameter
section parameter_dict instance-parameter
key php_bin php-bin:wrapper-path
key php_bin php-bin:wrapper-path
depends =
${matomo-apache-httpd:recipe}
${matomo-backup-cron:recipe}
[slap-parameter]
[slap-parameter]
instance.cli-url = ${apache-php-configuration:url}
instance.cli-url = ${apache-php-configuration:url}
...
...
software/matomo/software.cfg
View file @
fc0cfd30
[buildout]
[buildout]
extends =
extends =
buildout.hash.cfg
buildout.hash.cfg
#
apache-php mariadb zilb ...
#
LAMP stands for Linux, Apache, MySQL, PHP
../../stack/lamp/buildout.cfg
../../stack/lamp/buildout.cfg
# "slapos" stack describes basic things needed for 99.9% of SlapOS Software
# "slapos" stack describes basic things needed for 99.9% of SlapOS Software
../../stack/slapos.cfg
../../stack/slapos.cfg
../../component/diffutils/buildout.cfg
parts =
parts =
# Call installation of slapos.cookbook egg defined in stack/slapos.cfg (needed
# Call installation of slapos.cookbook egg defined in stack/slapos.cfg (needed
# in 99,9% of Slapos Software Releases)
# in 99,9% of Slapos Software Releases)
...
@@ -15,6 +17,10 @@ parts =
...
@@ -15,6 +17,10 @@ parts =
# to create file instance.cfg of all instances
# to create file instance.cfg of all instances
instance
instance
#to make sure we use python3
[python]
part = python3
# download bas
# download bas
# inherited by modules that need to download files
# inherited by modules that need to download files
[matomo-download]
[matomo-download]
...
@@ -31,7 +37,7 @@ md5sum = 8d592676bc2c0d51363ad7b2caf171fe
...
@@ -31,7 +37,7 @@ md5sum = 8d592676bc2c0d51363ad7b2caf171fe
# Without it the instance-matomo.cfg file will not be executed
# Without it the instance-matomo.cfg file will not be executed
[custom-application-deployment]
[custom-application-deployment]
path = ${template-matomo-instance:rendered}
path = ${template-matomo-instance:rendered}
part-list = matomo-backup.sh
part-list = matomo-backup.sh
matomo-backup-cron matomo-apache-httpd
[template-matomo-instance]
[template-matomo-instance]
recipe = slapos.recipe.template:jinja2
recipe = slapos.recipe.template:jinja2
...
@@ -39,6 +45,8 @@ template = ${:_profile_base_location_}/${:filename}
...
@@ -39,6 +45,8 @@ template = ${:_profile_base_location_}/${:filename}
rendered = ${buildout:directory}/instance-matomo.cfg
rendered = ${buildout:directory}/instance-matomo.cfg
extensions = jinja2.ext.do
extensions = jinja2.ext.do
context =
context =
key findutils_location findutils:location
key diffutils_location diffutils:location
key gzip_location gzip:location
key gzip_location gzip:location
key python3_location python3:location
key python3_location python3:location
key php_location apache-php:location
key php_location apache-php:location
...
...
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