Commit 54235d38 authored by HongzheWang's avatar HongzheWang

software/matomo:use component diff in matomo

parent 4bd247db
......@@ -19,8 +19,8 @@ md5sum = 9940e05d5e624a7884f4e6e062355798
[template-matomo-instance]
filename = matomo-instance.cfg.in
md5sum = de40893a14ca624492d47759e75db64a
md5sum = 34925db56b5f97e5a29080fb83fbefa8
[template-matomo-backup.sh]
filename = matomo-backup.sh.in
md5sum = bb0a10cb03dde2a3b43980a6b341f574
md5sum = fb29ad59813ef62c3f5934d4a0d90e14
......@@ -16,7 +16,7 @@ fi
trap 'rm -rf "$TMPFILE"' EXIT TERM INT
#we reserve backup folder in a month
{{ parameter_dict['find_bin'] }}/bin/find {{ parameter_dict['dir-backup'] }} -mtime +30 -type d |{{ parameter_dict['find_bin'] }}/bin/xargs rm -rf
{{ parameter_dict['find-bin'] }}/bin/find {{ parameter_dict['dir-backup'] }} -mtime +30 -type d |{{ parameter_dict['find-bin'] }}/bin/xargs rm -rf
#backup
......@@ -28,11 +28,11 @@ cp -rf {{ parameter_dict['document-root'] }}/matomo/plugins $TMPFILE/plugins
#check if copy-action finish well
if test ! -z "$(diff -r $TMPFILE/config {{ parameter_dict['document-root'] }}/matomo/config)"; then
if test ! -z "$({{ parameter_dict['diff-bin'] }}/bin/diff -r $TMPFILE/config {{ parameter_dict['document-root'] }}/matomo/config)"; then
exit 1
fi
if test ! -z "$(diff -r $TMPFILE/plugins {{ parameter_dict['document-root'] }}/matomo/plugins)"; then
if test ! -z "$({{ parameter_dict['diff-bin'] }}/bin/diff -r $TMPFILE/plugins {{ parameter_dict['document-root'] }}/matomo/plugins)"; then
exit 1
fi
......
......@@ -2,7 +2,8 @@
[instance-parameter]
matomo = ${:document-root}
dir-backup = ${directory:backup}
find_bin = {{ findutils_location }}
find-bin = {{ findutils_location }}
diff-bin = {{ diffutils_location }}
#php.ini parameters
php.memory_limit = 512M
......
......@@ -6,6 +6,8 @@ extends =
# "slapos" stack describes basic things needed for 99.9% of SlapOS Software
../../stack/slapos.cfg
../../component/diffutils/buildout.cfg
parts =
# Call installation of slapos.cookbook egg defined in stack/slapos.cfg (needed
# in 99,9% of Slapos Software Releases)
......@@ -44,6 +46,7 @@ rendered = ${buildout:directory}/instance-matomo.cfg
extensions = jinja2.ext.do
context =
key findutils_location findutils:location
key diffutils_location diffutils:location
key gzip_location gzip:location
key python3_location python3:location
key php_location apache-php:location
......
Markdown is supported
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