diff --git a/root/etc/cont-init.d/50-config b/root/etc/cont-init.d/50-config index 38eacc3..7e13fa0 100644 --- a/root/etc/cont-init.d/50-config +++ b/root/etc/cont-init.d/50-config @@ -16,9 +16,7 @@ GEOIP2INFLUX_LOG_LEVEL=${GEOIP2INFLUX_LOG_LEVEL}\\n\ MAXMINDDB_LICENSE_KEY=${MAXMINDDB_LICENSE_KEY}\\n" mkdir -p /config/geoip2db -cp -f /geoip2influx/geoip2influx.py /config/geoip2db -chown -R abc:abc /config/geoip2db -chmod +x /config/geoip2db/geoip2influx.py +cp -f /geoip2influx/geoip2influx.py /config/geoip2db # create GeoIP2 folder symlink [[ -d /var/lib/libmaxminddb ]] && [[ ! -L /var/lib/libmaxminddb ]] && \ @@ -33,3 +31,8 @@ if [ -n "$MAXMINDDB_LICENSE_KEY" ]; then /etc/periodic/weekly/libmaxminddb fi fi + +# permissions +chown -R abc:abc /config/geoip2db +chmod +x /config/geoip2db/geoip2influx.py +chmod -R 0644 /etc/logrotate.d \ No newline at end of file diff --git a/root/etc/logrotate.d/geoip2influx b/root/etc/logrotate.d/geoip2influx index 9a52475..8d66dfe 100644 --- a/root/etc/logrotate.d/geoip2influx +++ b/root/etc/logrotate.d/geoip2influx @@ -1,14 +1,14 @@ /config/geoip2db/geoip2influx.log { - weekly - rotate 7 - size 25M - compress - delaycompress - nodateext - missingok - notifempty - postrotate - s6-svc -r /var/run/s6/services/geoip2influx - endscript - su abc abc + daily + rotate 7 + size 25M + compress + delaycompress + nodateext + missingok + notifempty + postrotate + s6-svc -r /var/run/s6/services/geoip2influx + endscript + su abc abc } \ No newline at end of file diff --git a/root/etc/services.d/cron/run b/root/etc/services.d/cron/run new file mode 100644 index 0000000..270bb07 --- /dev/null +++ b/root/etc/services.d/cron/run @@ -0,0 +1,3 @@ +#!/usr/bin/with-contenv bash + +exec /usr/sbin/crond -f -S -l 5 -c /etc/crontabs \ No newline at end of file