- Update scripts to use bash instead of sh
- Update docs
This commit is contained in:
hwdsl2 2021-08-27 23:35:31 -05:00
parent dcb3a7ab83
commit da7697a5b0
11 changed files with 19 additions and 19 deletions

View File

@ -58,9 +58,9 @@ wget -O add_vpn_user.sh https://bit.ly/addvpnuser
```bash ```bash
# 所有变量值必须用 '单引号' 括起来 # 所有变量值必须用 '单引号' 括起来
# *不要* 在值中使用这些字符: \ " ' # *不要* 在值中使用这些字符: \ " '
sudo sh add_vpn_user.sh '要添加的用户名' '密码' sudo bash add_vpn_user.sh '要添加的用户名' '密码'
# 或者 # 或者
sudo sh add_vpn_user.sh '要更新的用户名' '新密码' sudo bash add_vpn_user.sh '要更新的用户名' '新密码'
``` ```
### 删除一个 VPN 用户 ### 删除一个 VPN 用户
@ -75,7 +75,7 @@ wget -O del_vpn_user.sh https://bit.ly/delvpnuser
```bash ```bash
# 所有变量值必须用 '单引号' 括起来 # 所有变量值必须用 '单引号' 括起来
# *不要* 在值中使用这些字符: \ " ' # *不要* 在值中使用这些字符: \ " '
sudo sh del_vpn_user.sh '要删除的用户名' sudo bash del_vpn_user.sh '要删除的用户名'
``` ```
### 更新所有的 VPN 用户 ### 更新所有的 VPN 用户
@ -96,7 +96,7 @@ wget -O update_vpn_users.sh https://bit.ly/updatevpnusers
```bash ```bash
nano -w update_vpn_users.sh nano -w update_vpn_users.sh
[替换为你自己的值: YOUR_USERNAMES 和 YOUR_PASSWORDS] [替换为你自己的值: YOUR_USERNAMES 和 YOUR_PASSWORDS]
sudo sh update_vpn_users.sh sudo bash update_vpn_users.sh
``` ```
**选项 2:** 将 VPN 用户信息定义为环境变量: **选项 2:** 将 VPN 用户信息定义为环境变量:
@ -108,7 +108,7 @@ sudo sh update_vpn_users.sh
sudo \ sudo \
VPN_USERS='用户名1 用户名2 ...' \ VPN_USERS='用户名1 用户名2 ...' \
VPN_PASSWORDS='密码1 密码2 ...' \ VPN_PASSWORDS='密码1 密码2 ...' \
sh update_vpn_users.sh bash update_vpn_users.sh
``` ```
## 手动管理 VPN 用户 ## 手动管理 VPN 用户

View File

@ -58,9 +58,9 @@ wget -O add_vpn_user.sh https://bit.ly/addvpnuser
```bash ```bash
# All values MUST be placed inside 'single quotes' # All values MUST be placed inside 'single quotes'
# DO NOT use these special characters within values: \ " ' # DO NOT use these special characters within values: \ " '
sudo sh add_vpn_user.sh 'username_to_add' 'password' sudo bash add_vpn_user.sh 'username_to_add' 'password'
# OR # OR
sudo sh add_vpn_user.sh 'username_to_update' 'new_password' sudo bash add_vpn_user.sh 'username_to_update' 'new_password'
``` ```
### Delete a VPN user ### Delete a VPN user
@ -75,7 +75,7 @@ wget -O del_vpn_user.sh https://bit.ly/delvpnuser
```bash ```bash
# All values MUST be placed inside 'single quotes' # All values MUST be placed inside 'single quotes'
# DO NOT use these special characters within values: \ " ' # DO NOT use these special characters within values: \ " '
sudo sh del_vpn_user.sh 'username_to_delete' sudo bash del_vpn_user.sh 'username_to_delete'
``` ```
### Update all VPN users ### Update all VPN users
@ -96,7 +96,7 @@ To use this script, choose one of the following options:
```bash ```bash
nano -w update_vpn_users.sh nano -w update_vpn_users.sh
[Replace with your own values: YOUR_USERNAMES and YOUR_PASSWORDS] [Replace with your own values: YOUR_USERNAMES and YOUR_PASSWORDS]
sudo sh update_vpn_users.sh sudo bash update_vpn_users.sh
``` ```
**Option 2:** Define VPN user details as environment variables: **Option 2:** Define VPN user details as environment variables:
@ -108,7 +108,7 @@ sudo sh update_vpn_users.sh
sudo \ sudo \
VPN_USERS='username1 username2 ...' \ VPN_USERS='username1 username2 ...' \
VPN_PASSWORDS='password1 password2 ...' \ VPN_PASSWORDS='password1 password2 ...' \
sh update_vpn_users.sh bash update_vpn_users.sh
``` ```
## Manually manage VPN users ## Manually manage VPN users

View File

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/bash
# #
# Script to add/update a VPN user for both IPsec/L2TP and Cisco IPsec # Script to add/update a VPN user for both IPsec/L2TP and Cisco IPsec
# #

View File

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/bash
# #
# Script to delete a VPN user for both IPsec/L2TP and Cisco IPsec # Script to delete a VPN user for both IPsec/L2TP and Cisco IPsec
# #

View File

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/bash
# #
# Script to update VPN users for both IPsec/L2TP and Cisco IPsec # Script to update VPN users for both IPsec/L2TP and Cisco IPsec
# #

View File

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/bash
# #
# Script to update Libreswan on Amazon Linux 2 # Script to update Libreswan on Amazon Linux 2
# #

View File

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/bash
# #
# Script to update Libreswan on CentOS and RHEL # Script to update Libreswan on CentOS and RHEL
# #

View File

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/bash
# #
# Script to update Libreswan on Ubuntu and Debian # Script to update Libreswan on Ubuntu and Debian
# #

View File

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/bash
# #
# Script for automatic setup of an IPsec VPN server on Amazon Linux 2 # Script for automatic setup of an IPsec VPN server on Amazon Linux 2
# Works on any dedicated server or virtual private server (VPS) # Works on any dedicated server or virtual private server (VPS)

View File

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/bash
# #
# Script for automatic setup of an IPsec VPN server on CentOS and RHEL # Script for automatic setup of an IPsec VPN server on CentOS and RHEL
# Works on any dedicated server or virtual private server (VPS) # Works on any dedicated server or virtual private server (VPS)

View File

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/bash
# #
# Script for automatic setup of an IPsec VPN server on Ubuntu and Debian # Script for automatic setup of an IPsec VPN server on Ubuntu and Debian
# Works on any dedicated server or virtual private server (VPS) # Works on any dedicated server or virtual private server (VPS)