## 070719.pptp_vpn_config username=$1 passwort=$2 profile=fhl kernelconfig=/usr/src/linux/.config filepasswd=/etc/ppp/chap-secrets fileprofile=/etc/ppp/peers/$profile filepppoptions=/etc/ppp/options modulconfig=/etc/modules.conf if [ -f /etc/modules.d/ppp ] && modulconfig=/etc/modules.d/ppp if [ -f /etc/modutils/ppp ] && modulconfig=/etc/modutils/ppp echo "pruefe kernelkonfig" grep MPP $kernelconfig echo "pruefe zu installierende Software" pkt=pptp-linux [ `dpkg --get-selections | grep "$pkt" | wc -l` -eq 0 ] && \ apt-get install pptp-linux echo "Modulkonfiguration anpassen" f=$modulconfig if [ ! -f "$f.org" ] && cp -p $f $f.org cp -p $f $f.old ## evtl. Modul ppp_mpe hinzufuegen echo "Profile fuer VPN-Verbindung anlegen" f=$fileprofile if [ ! -f "$f.org" ] && cp -p $f $f.org cp -p $f $f.old cat > $f < $f echo "Passwort hinterlegen" f=$filepasswd if [ ! -f "$f.org" ] && cp -p $f $f.org cp -p $f $f.old echo "$username * $passwort *" >> $f chmod 600 $f echo "fertig." echo "Starte den VPN-Tunnel mit \"pon $profile\" und beende ihn mit \"poff\"."