Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:GA
icinga
suse.de-icinga
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File suse.de-icinga of Package icinga
#!/bin/sh # # Compress old logfiles in /var/log/icinga/archives/ # once a week, if sysconfig variable is set to true # CFG='/etc/icinga/icinga.cfg' SYSCFG='/etc/sysconfig/icinga' if [[ -r $SYSCFG ]]; then . $SYSCFG else echo "$SYSCFG not found or not readable." >&2 exit 1 fi if [[ -r $CFG ]]; then ICINGA_USER=$( grep ^icinga_user $CFG | tail -n 1 | sed 's@.*=@@' | tr -d '[:cntrl:]') ICINGA_GROUP=$(grep ^icinga_group $CFG | tail -n 1 | sed 's@.*=@@' | tr -d '[:cntrl:]') fi if [ -z "$ICINGA_USER" ]; then ICINGA_USER='__ICINGA_USER__' fi if [ -z "$ICINGA_GROUP" ]; then ICINGA_GROUP='__ICINGA_GROUP__' fi if [ "$ICINGA_COMPRESS_LOGFILES" = "true" ]; then for f in /var/log/icinga/archives/*.log ; do if [[ -r "$f" ]] ; then setpriv --init-groups --ruid $ICINGA_USER --rgid $ICINGA_GROUP --inh-caps -all --reset-env /usr/bin/bzip2 "$f" fi done fi
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor