Script to automatically change PPOE username/pass

Discussion in 'Tomato Firmware' started by kripz, Apr 16, 2009.

  1. kripz

    kripz LI Guru Member

    I want to change my username/password at 12AM and then to disconnect/connect the internet (to reauthenticate and change accounts). At 7AM i want to change it back to the account in the tomato settings.

    I only want this script to work when the username set in the script differs to the username in tomato.

    Code:
    $script_username = "user"
    $script_password = "password"
    
    while true
    {
    if $script_username != $tomato_username
    {
    if $time == 12AM
    {
    disconnect
    set username = $script_username
    set password = $script_password
    connect
    }
    else if $time == 7AM
    {
    disconnect
    set username = $tomato_username
    set password = $tomato_password
    connect
    }
    sleep 10 minutes
    }
     
  2. kripz

    kripz LI Guru Member

    Not possible?
     
  3. mecha50

    mecha50 Network Guru Member

    I use this script and put in under the scheduler.

    Set it under Customer then set the time.

    service wan stop
    nvram set "ppp_username=USERNAME"
    nvram set "ppp_passwd=PASSWORD"
    service wan restart
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice