angristan / openvpn-install

Set up your own OpenVPN server on Debian, Ubuntu, Fedora, CentOS or Arch Linux.
https://stanislas.blog
MIT License
13.74k stars 2.98k forks source link

No check if package installation was successful? #907

Open user9931 opened 3 years ago

user9931 commented 3 years ago

I'm using centos 7 and it have some issues with small amounth of memory available. Its not a problem for me (unload some apps, or download packages and install it locally), but its strange how script reacts when package installation not successful... - it think its okay and ask about client name! And if we run the script another time, it think openvpn was installed / configured (but its not) and as what to do (add client, revoke, remove openvpn, exit). Also, if we select "remove", it trying to stop the service (which doesnot exist because it wasnt installed), then trying to remove the package (which doesnot installed), then says that "OpenVPN removed!"

Okay, that was all I needed. We are ready to setup your OpenVPN server now.
You will be able to generate a client at the end of the installation.
Press any key to continue...
error: rpmdb: BDB0113 Thread/process 5457/140472739608384 failed: BDB1507 Thread died in Berkeley DB library
error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db5 -  (-30973)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:

Error: rpmdb open failed
error: rpmdb: BDB0113 Thread/process 5457/140472739608384 failed: BDB1507 Thread died in Berkeley DB library
error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db5 -  (-30973)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:

Error: rpmdb open failed
--2021-09-10 08:12:20--  https://github.com/OpenVPN/easy-rsa/releases/download/v3.0.7/EasyRSA-3.0.7.tgz
Resolving github.com (github.com)... 140.82.121.3
Connecting to github.com (github.com)|140.82.121.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-releases.githubusercontent.com/4519663/0fa24e00-72ba-11ea-9afe-6e5829eec4a4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210910%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210910T071109Z&X-Amz-Expires=300&X-Amz-Signature=7e5ce230b2f67bb20a68d38c35dff024c5691306785606f6a335b5ff2c130e0e&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=4519663&response-content-disposition=attachment%3B%20filename%3DEasyRSA-3.0.7.tgz&response-content-type=application%2Foctet-stream [following]
--2021-09-10 08:12:20--  https://github-releases.githubusercontent.com/4519663/0fa24e00-72ba-11ea-9afe-6e5829eec4a4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210910%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210910T071109Z&X-Amz-Expires=300&X-Amz-Signature=7e5ce230b2f67bb20a68d38c35dff024c5691306785606f6a335b5ff2c130e0e&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=4519663&response-content-disposition=attachment%3B%20filename%3DEasyRSA-3.0.7.tgz&response-content-type=application%2Foctet-stream
Resolving github-releases.githubusercontent.com (github-releases.githubusercontent.com)... 2606:50c0:8003::154, 2606:50c0:8002::154, 2606:50c0:8000::154, ...
Connecting to github-releases.githubusercontent.com (github-releases.githubusercontent.com)|2606:50c0:8003::154|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 48215 (47K) [application/octet-stream]
Saving to: '/root/easy-rsa.tgz'

100%[==========================================================>] 48,215      --.-K/s   in 0.002s

2021-09-10 08:12:20 (23.5 MB/s) - '/root/easy-rsa.tgz' saved [48215/48215]

Note: using Easy-RSA configuration from: /etc/openvpn/easy-rsa/vars

init-pki complete; you may now create a CA or requests.
Your newly created PKI dir is: /etc/openvpn/easy-rsa/pki

Using SSL: openssl OpenSSL 1.0.2k-fips  26 Jan 2017
read EC key
writing EC key

Note: using Easy-RSA configuration from: /etc/openvpn/easy-rsa/vars
Using SSL: openssl OpenSSL 1.0.2k-fips  26 Jan 2017
Generating a 256 bit EC private key
writing new private key to '/etc/openvpn/easy-rsa/pki/easy-rsa-5934.qYPHGF/tmp.zSYhbT'
-----
Using configuration from /etc/openvpn/easy-rsa/pki/easy-rsa-5934.qYPHGF/tmp.q925Nf
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
commonName            :ASN.1 12:'server_J5KKQ3iGIezO3G54'
Certificate is to be certified until Dec 14 07:12:21 2023 GMT (825 days)

Write out database with 1 new entries
Data Base Updated

Note: using Easy-RSA configuration from: /etc/openvpn/easy-rsa/vars
Using SSL: openssl OpenSSL 1.0.2k-fips  26 Jan 2017
Using configuration from /etc/openvpn/easy-rsa/pki/easy-rsa-6023.n5l2wp/tmp.zSlkxb

An updated CRL has been created.
CRL file: /etc/openvpn/easy-rsa/pki/crl.pem

./openvpn-install.sh: line 744: openvpn: command not found
<cut>
Tell me a name for the client.
The name must consist of alphanumeric character. It may also include an underscore or a dash.
Client name:
creeper0167 commented 1 year ago

can I work on this?