Update testserver.sh
This commit is contained in:
@@ -1,30 +1 @@
|
|||||||
#! /bin/bash
|
touch /tmp/x.txt
|
||||||
#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
|
|
||||||
|
|||||||
Reference in New Issue
Block a user