#!/bin/sh

[ -z "$ROOT" ] && ROOT=/www
CONFIG=$ROOT/config
SCRIPT=$ROOT/script

[ -z "$apn" ] && echo "No APN" && exit 1
cat > $CONFIG/mobile.conf <<- EOM
MOBILE_APN='$apn'
MOBILE_USERNAME='$username'
MOBILE_PASSWORD='$password'
MOBILE_PIN='$pin'
EOM

$SCRIPT/setup/setup-mobile.sh

uci commit
/etc/init.d/network reload