mirror of
https://github.com/teddysun/across.git
synced 2025-01-19 06:19:35 +08:00
Add l2tp command
This commit is contained in:
parent
021b4ecf01
commit
878a2bdf0c
5
l2tp.sh
5
l2tp.sh
@ -704,6 +704,8 @@ finally(){
|
|||||||
|
|
||||||
cd ${cur_dir}
|
cd ${cur_dir}
|
||||||
rm -fr ${cur_dir}/l2tp
|
rm -fr ${cur_dir}/l2tp
|
||||||
|
# create l2tp command
|
||||||
|
cp -f ${cur_dir}/l2tp.sh /usr/bin/l2tp
|
||||||
|
|
||||||
echo "Please wait a moment..."
|
echo "Please wait a moment..."
|
||||||
sleep 5
|
sleep 5
|
||||||
@ -758,7 +760,6 @@ list_users(){
|
|||||||
fi
|
fi
|
||||||
echo "========== Users List =========="
|
echo "========== Users List =========="
|
||||||
grep -v "^#" /etc/ppp/chap-secrets | awk '{print $1}'
|
grep -v "^#" /etc/ppp/chap-secrets | awk '{print $1}'
|
||||||
echo "================================"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
add_user(){
|
add_user(){
|
||||||
@ -768,7 +769,7 @@ add_user(){
|
|||||||
if [ -z ${user} ]; then
|
if [ -z ${user} ]; then
|
||||||
echo "Username can not be empty"
|
echo "Username can not be empty"
|
||||||
else
|
else
|
||||||
grep -w "${user}" /etc/ppp/chap-secrets >/dev/null 2>&1
|
grep -w "${user}" /etc/ppp/chap-secrets > /dev/null 2>&1
|
||||||
if [ $? -eq 0 ];then
|
if [ $? -eq 0 ];then
|
||||||
echo "Username (${user}) already exists. Please re-enter your username."
|
echo "Username (${user}) already exists. Please re-enter your username."
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user