Create telemetry data directory in packaged examples
Reviewers: buda Reviewed By: buda Differential Revision: https://phabricator.memgraph.io/D1447
This commit is contained in:
parent
a82419f824
commit
47e40ffe03
@ -27,8 +27,17 @@ case "$1" in
|
|||||||
chmod 750 /var/lib/memgraph || exit 1
|
chmod 750 /var/lib/memgraph || exit 1
|
||||||
chown memgraph:adm /var/log/memgraph || exit 1
|
chown memgraph:adm /var/log/memgraph || exit 1
|
||||||
chmod 750 /var/log/memgraph || exit 1
|
chmod 750 /var/log/memgraph || exit 1
|
||||||
# Make examples directory immutable (optional)
|
|
||||||
chattr +i -R /usr/share/memgraph/examples || true
|
# Create telemetry directory in examples
|
||||||
|
for i in /usr/share/memgraph/examples/*; do
|
||||||
|
# The telemetry directory may already exist from some prior installation
|
||||||
|
if [ ! -d $i/telemetry ]; then
|
||||||
|
mkdir $i/telemetry || exit 1
|
||||||
|
fi
|
||||||
|
chown -R memgraph:memgraph $i/telemetry || exit 1
|
||||||
|
# Make snapshots directory immutable (optional)
|
||||||
|
chattr +i -R $i/snapshots || true
|
||||||
|
done
|
||||||
|
|
||||||
# Generate SSL certificates
|
# Generate SSL certificates
|
||||||
if [ ! -d /etc/memgraph/ssl ]; then
|
if [ ! -d /etc/memgraph/ssl ]; then
|
||||||
|
@ -26,6 +26,16 @@ case "$1" in
|
|||||||
for var_file in $var_files; do
|
for var_file in $var_files; do
|
||||||
rm -rf $var_file
|
rm -rf $var_file
|
||||||
done
|
done
|
||||||
|
# Remove generated SSL certificates
|
||||||
|
if [ -d /etc/memgraph/ssl ]; then
|
||||||
|
rm -rf /etc/memgraph/ssl
|
||||||
|
fi
|
||||||
|
# Remove stored telemetry data
|
||||||
|
for i in /usr/share/memgraph/examples/*; do
|
||||||
|
if [ -d $i/telemetry ]; then
|
||||||
|
rm -rf $i/telemetry
|
||||||
|
fi
|
||||||
|
done
|
||||||
# Don't remove the 'memgraph' user, since we cannot be sure whether it
|
# Don't remove the 'memgraph' user, since we cannot be sure whether it
|
||||||
# existed before.
|
# existed before.
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user