Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
PUBLIC_ALL
openvpn_client_script
Commits
a77d11a8
Commit
a77d11a8
authored
May 29, 2022
by
root
Browse files
deleted 'read'
parent
c20409a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
make_client.sh
make_client.sh
+9
-10
No files found.
make_client.sh
View file @
a77d11a8
...
...
@@ -6,29 +6,28 @@ KEY_DIR=${DIR_CLI}/keys
OUTPUT_DIR
=
${
DIR_CLI
}
/files
BASE_CONFIG
=
${
DIR_CLI
}
/base.conf
echo
"Укажите название конфига"
read
config_name
if
[
-z
${
config_name
}
]
;
if
[
-z
${
1
}
]
;
then
echo
Нужно запускать скрипт с параметром имя создаваемого клиента
else
cd
${
DIR_RSA
}
./easyrsa build-client-full
${
config_name
}
nopass
cp
./pki/private/
${
config_name
}
.key
${
DIR_CLI
}
/keys/
./easyrsa build-client-full
${
1
}
nopass
cp
./pki/private/
${
1
}
.key
${
DIR_CLI
}
/keys/
#./easyrsa import-req ./pki/reqs/$1.req $1
#./easyrsa sign-req client $1
cp
./pki/issued/
${
config_name
}
.crt
${
DIR_CLI
}
/keys/
cp
./pki/issued/
${
1
}
.crt
${
DIR_CLI
}
/keys/
cat
${
BASE_CONFIG
}
\
<
(
echo
-e
'\n<ca>'
)
\
${
KEY_DIR
}
/ca.crt
\
<
(
echo
-e
'</ca>\n<cert>'
)
\
${
KEY_DIR
}
/
${
config_name
}
.crt
\
${
KEY_DIR
}
/
${
1
}
.crt
\
<
(
echo
-e
'</cert>\n<key>'
)
\
${
KEY_DIR
}
/
${
config_name
}
.key
\
${
KEY_DIR
}
/
${
1
}
.key
\
<
(
echo
-e
'</key>\n<tls-auth>'
)
\
${
KEY_DIR
}
/ta.key
\
<
(
echo
-e
'</tls-auth>'
)
\
>
${
OUTPUT_DIR
}
/
${
config_name
}
.ovpn
echo
"
Zaberi svoe gavno tyt
:
${
OUTPUT_DIR
}
/"
>
${
OUTPUT_DIR
}
/
${
1
}
.ovpn
echo
"
Забери свое гавно тут
:
${
OUTPUT_DIR
}
/"
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment