mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
net/pptpd: add static remote ip in config file
Add ability to configure a static remote ip in pptp config file This change has backward compatibility with old config files Also remove the MAINTAINER as intructed Signed-off-by: Thiago Pereira Ricciardi <thiago.ricciardi@gmail.com>
This commit is contained in:
@@ -12,7 +12,8 @@ OPTIONS_PPTP=/var/etc/options.pptpd
|
||||
validate_login_section() {
|
||||
uci_load_validate pptpd login "$1" "$2" \
|
||||
'username:string' \
|
||||
'password:string'
|
||||
'password:string' \
|
||||
'remoteip:string'
|
||||
}
|
||||
|
||||
validate_pptpd_section() {
|
||||
@@ -32,8 +33,9 @@ setup_login() {
|
||||
|
||||
[ -n "$username" ] || return 0
|
||||
[ -n "$password" ] || return 0
|
||||
[ -n "$remoteip" ] || remoteip=*
|
||||
|
||||
echo "$username pptp-server $password *" >> $CHAP_SECRETS
|
||||
echo "$username pptp-server $password $remoteip" >> $CHAP_SECRETS
|
||||
}
|
||||
|
||||
setup_config() {
|
||||
|
||||
Reference in New Issue
Block a user