Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3c3f5d8

Browse files
Syntax fix
1 parent 7a23496 commit 3c3f5d8

File tree

14 files changed

+37
-33
lines changed

14 files changed

+37
-33
lines changed

‎CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
### 3.0.3 - Fixed syntax
4+
5+
- Fixed bash scripts syntax
6+
37
### 3.0.0 - New major release
48

59
- Changed fs structure

‎root/usr/local/bin/ovpn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
set -e
77

8-
function usage() {
8+
function usage {
99
echo 'Usage: ovpn COMMAND [ARGS..]'
1010
echo ''
1111
echo 'Commands:'

‎root/usr/local/bin/ovpn-pki

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ source $CONTAINER_VARS_FILE
1010
command="$(echo 1ドル | tr '[:upper:]' '[:lower:]')"
1111

1212
# Generate CA certificate
13-
function generate_ca() {
13+
function generate_ca {
1414
echo 'Now it will build CA files for issuing new certifiactes'
1515
echo 'Please protect ca.key with secure password (used for signing new certs)'
1616
echo 'ca.key is needed only for signing new certificates, not for OpenVPN to work'
@@ -19,7 +19,7 @@ function generate_ca() {
1919
}
2020

2121
# Generate CRL
22-
function generate_crl() {
22+
function generate_crl {
2323
if [ ! -d "$EASYRSA_PKI" ]; then
2424
exit 0
2525
fi
@@ -29,21 +29,21 @@ function generate_crl() {
2929
}
3030

3131
# Generate dh.pem
32-
function generate_dh() {
32+
function generate_dh {
3333
$RUNCMD easyrsa gen-dh ${@:1}
3434
$RUNCMD cp $EASYRSA_PKI/dh.pem $OPENVPN_DIR # Relect to OpenVPN
3535
}
3636

3737
# Generate ta.key
38-
function generate_ta() {
38+
function generate_ta {
3939
$RUNCMD openvpn --genkey --secret $EASYRSA_PKI/ta.key
4040
$RUNCMD cp $EASYRSA_PKI/ta.key $OPENVPN_DIR # Relect to OpenVPN
4141
}
4242

4343
#
4444
# Delete PKI
4545
#
46-
function pki_delete() {
46+
function pki_delete {
4747
# Check if PKI directory exists
4848
if [ ! -d "$EASYRSA_PKI" ]; then
4949
echo 'PKI does not exist'
@@ -63,7 +63,7 @@ function pki_delete() {
6363
#
6464
# Init PKI
6565
#
66-
function pki_init() {
66+
function pki_init {
6767
# Check if PKI directory exists
6868
if [ -d "$EASYRSA_PKI" ]; then
6969
read -r -p 'PKI already exist, reconfigure? [y/N] ' response
@@ -122,7 +122,7 @@ function pki_init() {
122122
#
123123
# Reflect PKI files into OpenVPN directory
124124
#
125-
function pki_reflect() {
125+
function pki_reflect {
126126
if [ ! -d "$EASYRSA_PKI" ]; then
127127
exit 0
128128
fi

‎root/usr/local/bin/ovpn-subject

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fi
1919
# @param 1ドル common name
2020
# @param 2ドル file (optional)
2121
#
22-
function generate_ovpn() {
22+
function generate_ovpn {
2323
if [ $# -lt 1 ]; then
2424
echo 'Invalid common name'
2525
exit 1
@@ -114,7 +114,7 @@ function generate_ovpn() {
114114
# @param 1ドル common name
115115
# @param 2ドル file (optional)
116116
#
117-
function generate_pkg() {
117+
function generate_pkg {
118118
if [ $# -lt 1 ]; then
119119
echo 'Invalid common name'
120120
exit 1
@@ -218,7 +218,7 @@ function generate_pkg() {
218218
# @param 2ドル type (client|server)
219219
# @param 3ドル+ easy-rsa gen-req args
220220
#
221-
function subject_add() {
221+
function subject_add {
222222
if [ $# -lt 2 ]; then
223223
echo 'Invalid arguments: COMMONNAME TYPE [EASYRSA_ARGS]'
224224
echo 'Available types: client, server'
@@ -281,7 +281,7 @@ function subject_add() {
281281
# Import signing request
282282
# @param 1ドル .req file path
283283
#
284-
function subject_importreq() {
284+
function subject_importreq {
285285
if [ $# -lt 1 ]; then
286286
echo 'Invalid file'
287287
exit 1
@@ -295,7 +295,7 @@ function subject_importreq() {
295295
# @param 2ドル type (client|server)
296296
# @param 3ドル+ easy-rsa gen-req args
297297
#
298-
function subject_renew() {
298+
function subject_renew {
299299
if [ $# -lt 2 ]; then
300300
echo 'Invalid arguments: COMMONNAME TYPE [EASYRSA_ARGS]'
301301
echo 'Available types: client, server'
@@ -348,7 +348,7 @@ function subject_renew() {
348348
# Revoke subject
349349
# @param 1ドル common name
350350
#
351-
function subject_revoke() {
351+
function subject_revoke {
352352
if [ $# -lt 1 ]; then
353353
echo 'Invalid common name'
354354
exit 1
@@ -369,7 +369,7 @@ function subject_revoke() {
369369
# @param 2ドル option
370370
# @param 3ドル+ other args
371371
#
372-
function subject_set() {
372+
function subject_set {
373373
if [ $# -lt 3 ]; then
374374
echo 'Usage: set COMMONNAME OPTION [ARGS]'
375375
exit 1

‎root/usr/local/share/docker-openvpn/examples/basic/wizard

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ read -p 'Port [1194]: ' port
1818
port=${port:-1194}
1919

2020
read -p 'Public IP: ' public_ip
21-
if [ -z "$public_ip" ]; then echo 'Invalid IP'; exit 2; fi
21+
[ -z "$public_ip" ] && { echo 'Invalid IP'; exit 2; }
2222

2323
read -p 'VPN network [10.8.0.0]: ' network
2424
network=${network:-'10.8.0.0'}

‎root/usr/local/share/docker-openvpn/examples/basic_ipv6/wizard

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ read -p 'Port [1194]: ' port
1818
port=${port:-1194}
1919

2020
read -p 'Public IP: ' public_ip
21-
if [ -z "$public_ip" ]; then echo 'Invalid IP'; exit 2; fi
21+
[ -z "$public_ip" ] && { echo 'Invalid IP'; exit 2; }
2222

2323
read -p 'VPN network [10.8.0.0]: ' network
2424
network=${network:-'10.8.0.0'}

‎root/usr/local/share/docker-openvpn/examples/basic_nat/wizard

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ read -p 'Port [1194]: ' port
2121
port=${port:-1194}
2222

2323
read -p 'Public IP: ' public_ip
24-
if [ -z "$public_ip" ]; then echo 'Invalid IP'; exit 2; fi
24+
[ -z "$public_ip" ] && { echo 'Invalid IP'; exit 2; }
2525

2626
read -p 'VPN network [10.8.0.0]: ' network
2727
network=${network:-'10.8.0.0'}

‎root/usr/local/share/docker-openvpn/examples/basic_nat_ipv6/wizard

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ read -p 'Port [1194]: ' port
2121
port=${port:-1194}
2222

2323
read -p 'Public IP: ' public_ip
24-
if [ -z "$public_ip" ]; then echo 'Invalid IP'; exit 2; fi
24+
[ -z "$public_ip" ] && { echo 'Invalid IP'; exit 2; }
2525

2626
read -p 'VPN network [10.8.0.0]: ' network
2727
network=${network:-'10.8.0.0'}

‎root/usr/local/share/docker-openvpn/examples/basic_nat_wlp/wizard

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ read -p 'Port [1194]: ' port
2121
port=${port:-1194}
2222

2323
read -p 'Public IP: ' public_ip
24-
if [ -z "$public_ip" ]; then echo 'Invalid IP'; exit 2; fi
24+
[ -z "$public_ip" ] && { echo 'Invalid IP'; exit 2; }
2525

2626
read -p 'VPN network [10.8.0.0]: ' network
2727
network=${network:-'10.8.0.0'}

‎root/usr/local/share/docker-openvpn/examples/basic_nat_wlp_ipv6/wizard

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ read -p 'Port [1194]: ' port
2121
port=${port:-1194}
2222

2323
read -p 'Public IP: ' public_ip
24-
if [ -z "$public_ip" ]; then echo 'Invalid IP'; exit 2; fi
24+
[ -z "$public_ip" ] && { echo 'Invalid IP'; exit 2; }
2525

2626
read -p 'VPN network [10.8.0.0]: ' network
2727
network=${network:-'10.8.0.0'}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /