logrotate fix
This commit is contained in:
parent
2d3531d1dd
commit
ef386dc811
3 changed files with 21 additions and 15 deletions
|
@ -17,8 +17,6 @@ MAXMINDDB_LICENSE_KEY=${MAXMINDDB_LICENSE_KEY}\\n"
|
||||||
|
|
||||||
mkdir -p /config/geoip2db
|
mkdir -p /config/geoip2db
|
||||||
cp -f /geoip2influx/geoip2influx.py /config/geoip2db
|
cp -f /geoip2influx/geoip2influx.py /config/geoip2db
|
||||||
chown -R abc:abc /config/geoip2db
|
|
||||||
chmod +x /config/geoip2db/geoip2influx.py
|
|
||||||
|
|
||||||
# create GeoIP2 folder symlink
|
# create GeoIP2 folder symlink
|
||||||
[[ -d /var/lib/libmaxminddb ]] && [[ ! -L /var/lib/libmaxminddb ]] && \
|
[[ -d /var/lib/libmaxminddb ]] && [[ ! -L /var/lib/libmaxminddb ]] && \
|
||||||
|
@ -33,3 +31,8 @@ if [ -n "$MAXMINDDB_LICENSE_KEY" ]; then
|
||||||
/etc/periodic/weekly/libmaxminddb
|
/etc/periodic/weekly/libmaxminddb
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# permissions
|
||||||
|
chown -R abc:abc /config/geoip2db
|
||||||
|
chmod +x /config/geoip2db/geoip2influx.py
|
||||||
|
chmod -R 0644 /etc/logrotate.d
|
|
@ -1,14 +1,14 @@
|
||||||
/config/geoip2db/geoip2influx.log {
|
/config/geoip2db/geoip2influx.log {
|
||||||
weekly
|
daily
|
||||||
rotate 7
|
rotate 7
|
||||||
size 25M
|
size 25M
|
||||||
compress
|
compress
|
||||||
delaycompress
|
delaycompress
|
||||||
nodateext
|
nodateext
|
||||||
missingok
|
missingok
|
||||||
notifempty
|
notifempty
|
||||||
postrotate
|
postrotate
|
||||||
s6-svc -r /var/run/s6/services/geoip2influx
|
s6-svc -r /var/run/s6/services/geoip2influx
|
||||||
endscript
|
endscript
|
||||||
su abc abc
|
su abc abc
|
||||||
}
|
}
|
3
root/etc/services.d/cron/run
Normal file
3
root/etc/services.d/cron/run
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/with-contenv bash
|
||||||
|
|
||||||
|
exec /usr/sbin/crond -f -S -l 5 -c /etc/crontabs
|
Loading…
Reference in a new issue