Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 180fba0a

Přidáno uživatelem David Raška před asi 11 roky(ů)

Upravy:
- Vypnuti barevneho vypisovani v CRONu

Zobrazit rozdíly:

import.sh
function style
{
# if [ -n "$TERM" ]
# then
# tput $1 $2
# fi
if [[ $cron == FALSE ]]
then
tput $1 $2
fi
}
function print_info
......
echo "--------------------------------------------------------------------------------"
if [[ "$1" == "--cron" ]] || [[ "$1" == "-c" ]];
then
cron=TRUE
else
cron=FALSE
fi
if [ -r /etc/freenetis-addresses.ini ]
then
. /etc/freenetis-addresses.ini
......
minutes=$(($seconds / 60))
seconds=$(($seconds % 60))
print_info "Import takes $(printf '%d:%02d:%02d\n' $hours $minutes $seconds)"
print_info "Import takes $(printf '%d:%02d:%02d\n' $hours $minutes $seconds)"
install.sh
echo "# /etc/cron.d/freenetis-addresses: Regular CRON file for freenetis-addressses (triggered each day)" > /etc/cron.d/freenetis-addresses
echo "" >> /etc/cron.d/freenetis-addresses
echo "SHELL=/bin/bash" >> /etc/cron.d/freenetis-addresses
echo "00 5 * * * root /var/www/freenetis-addresses/import.sh >>\"/var/log/freenetis-addresses.log\" 2>&1" >> /etc/cron.d/freenetis-addresses
echo "00 5 * * * root /var/www/freenetis-addresses/import.sh --cron >>\"/var/log/freenetis-addresses.log\" 2>&1" >> /etc/cron.d/freenetis-addresses
if [ -x /usr/sbin/invoke-rc.d ]; then
invoke-rc.d cron restart 3>/dev/null || true

Také k dispozici: Unified diff