Redialer add-on v2.28 [INACTIVE]

Here we discuss compilation and how to build an addon for BFW.

Redialer add-on v2.28

Mensagempor The Lightning Stalker » Sáb Jul 15, 2006 4:29 pm

New project page at http://www.brazilfw.com.br/forum/viewtopic.php?t=59975

The following information is outdated.

Hello. I decided to release an updated version of redialer since I'm already using this myself. Maybe someone else will use it. It has an interesting init scrpt (rc.redialer) that demonstrates how the coyote.cfg can be checked on-the-fly for certain lines (in this case ENABLE_CRON='YES') and then modified or added if they aren't right or don't exist, configuration backed up, the system rebooted, and then a line added to the crontab.

In case you don't know what redialer does, it is activated when you tell the firewall to dial and redials when the connection is dropped. When you tell the firewall to disconnect, it is deactivated. It functions just like the "redial when connection is dropped" checkbox in Windows.

Here is the rc script:

Código: Selecionar todos
#!/bin/sh
#
# Installs the redialer cron job
#
# Script by Robert Dvoracek
# 19/06/2006

. /etc/coyote/coyote.conf

echo Configuring redialer cron job . . .
if [ "$ENABLE_CRON" = "YES" ]; then
        echo '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59 * * * * /usr/local/sbin/chkppp' >> /var/spool/cron/crontabs/root
else
        echo Cron disabled.  Enabling cron and rebootng.
        grep -iv 'enable_cron' /etc/coyote/coyote.conf > /etc/coyote/coyote.bonf
        mv /etc/coyote/coyote.bonf /etc/coyote/coyote.conf
        echo "ENABLE_CRON='YES'" >> /etc/coyote/coyote.conf
        lrcfg.back
        reboot
fi


It should probably be modified to check for the crontab line before appending it so that there aren't extra ones added.
The Lightning Stalker
 

Voltar para Add-On Factory

Quem está online

Usuários navegando neste fórum: Nenhum usuário registrado e 2 visitantes