Update testserver.sh

This commit is contained in:
2023-10-05 11:47:40 +00:00
parent ab6ad5fe98
commit 4ef1e91fd6

View File

@@ -1,30 +1 @@
#! /bin/bash
#touch /tmp/x.txt
# Check if programm LogRotate exists
if command -v logrotate >/dev/null;
then
echo "Program Logrotate exists. Continue..."
else
echo "Program Lognotate doen not exist. Start installation..."
apt-get install -y logrotate
fi
if [ ! -f /etc/logrotate.d/odoo ];
then
echo "Config-file for logrotation Odoo not found!"
#create config-file for Odoo Logrotation
cat <<EOF > /etc/logrotate.d/odoo
/var/log/odoo/*.log {
daily
missingok
rotate 7
compress
notifempty
}
EOF
echo "Created Odoo logrotation succesfully."
else
echo "Odoo logrotation allready exists."
fi
touch /tmp/x.txt