2012-08-21 18:25:56 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2012-08-24 15:09:57 +00:00
|
|
|
# How many day do we keep the logs ?
|
|
|
|
DAYS=366
|
|
|
|
|
2012-08-21 18:25:56 +00:00
|
|
|
for CONFIG_FILE in \
|
|
|
|
/etc/alternc/local.sh \
|
|
|
|
/usr/lib/alternc/functions.sh
|
|
|
|
do
|
|
|
|
if [ ! -r "$CONFIG_FILE" ]; then
|
|
|
|
echo "Can't access $CONFIG_FILE."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
. "$CONFIG_FILE"
|
|
|
|
done
|
2012-08-24 15:09:57 +00:00
|
|
|
|
2013-09-12 09:28:31 +00:00
|
|
|
stop_if_jobs_locked
|
2012-08-24 15:09:57 +00:00
|
|
|
|
2013-09-12 09:28:31 +00:00
|
|
|
# ALTERNC_LOGS is from local.sh
|
2014-01-08 11:54:27 +00:00
|
|
|
nice -n 10 find "$ALTERNC_LOGS" -mtime +$DAYS -delete
|