source: soft/build_system/build_system/upload/robot/trunk/stop_if_full @ 1

Last change on this file since 1 was 1, checked in by fasma, 13 years ago

Initial Import from Mandriva's soft revision 224062 and package revision 45733

File size: 460 bytes
Line 
1#!/bin/bash
2
3free=`df -k /mnt/BIG/ | grep md0 | awk '{print $4}'`
4
5echo $free bytes available
6
7if [[ $free -lt 5000000 ]]; then
8        (cat <<EOF
9From: ken space monitor <warly@mandriva.com>
10To: warly@mandriva.com
11Cc: maintainers@mandriva.com
12Subject: ken filesystem is full
13
14Only $free bytes available.
15
16Stopping upload and mirroring processes.
17
18EOF
19) | /usr/sbin/sendmail  -B8BITMIME -oi -t
20        echo Stopping cron
21        service crond stop
22        sleep 5
23        service crond stop
24
25fi
Note: See TracBrowser for help on using the repository browser.