Fix GitHub action (#515)
This commit is contained in:
parent
12ba1a9d9a
commit
caa571f768
2
.github/workflows/push.yml
vendored
2
.github/workflows/push.yml
vendored
@ -6,6 +6,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@master
|
||||||
- name: shellcheck
|
- name: shellcheck
|
||||||
uses: actions/bin/shellcheck@master
|
uses: ludeeus/action-shellcheck@0.0.1
|
||||||
with:
|
with:
|
||||||
args: openvpn-install.sh -e SC1091,SC2164,SC2034,SC1072,SC1073,SC1009
|
args: openvpn-install.sh -e SC1091,SC2164,SC2034,SC1072,SC1073,SC1009
|
||||||
|
@ -18,6 +18,7 @@ function tunAvailable () {
|
|||||||
function checkOS () {
|
function checkOS () {
|
||||||
if [[ -e /etc/debian_version ]]; then
|
if [[ -e /etc/debian_version ]]; then
|
||||||
OS="debian"
|
OS="debian"
|
||||||
|
# shellcheck disable=SC1091
|
||||||
source /etc/os-release
|
source /etc/os-release
|
||||||
|
|
||||||
if [[ "$ID" == "debian" || "$ID" == "raspbian" ]]; then
|
if [[ "$ID" == "debian" || "$ID" == "raspbian" ]]; then
|
||||||
@ -51,6 +52,7 @@ function checkOS () {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
elif [[ -e /etc/system-release ]]; then
|
elif [[ -e /etc/system-release ]]; then
|
||||||
|
# shellcheck disable=SC1091
|
||||||
source /etc/os-release
|
source /etc/os-release
|
||||||
if [[ "$ID" = "centos" ]]; then
|
if [[ "$ID" = "centos" ]]; then
|
||||||
OS="centos"
|
OS="centos"
|
||||||
@ -652,7 +654,7 @@ function installOpenVPN () {
|
|||||||
chown -R root:root /etc/openvpn/easy-rsa/
|
chown -R root:root /etc/openvpn/easy-rsa/
|
||||||
rm -f ~/EasyRSA-unix-v${version}.tgz
|
rm -f ~/EasyRSA-unix-v${version}.tgz
|
||||||
|
|
||||||
cd /etc/openvpn/easy-rsa/
|
cd /etc/openvpn/easy-rsa/ || return
|
||||||
case $CERT_TYPE in
|
case $CERT_TYPE in
|
||||||
1)
|
1)
|
||||||
echo "set_var EASYRSA_ALGO ec" > vars
|
echo "set_var EASYRSA_ALGO ec" > vars
|
||||||
@ -1083,7 +1085,7 @@ function revokeClient () {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
CLIENT=$(tail -n +2 /etc/openvpn/easy-rsa/pki/index.txt | grep "^V" | cut -d '=' -f 2 | sed -n "$CLIENTNUMBER"p)
|
CLIENT=$(tail -n +2 /etc/openvpn/easy-rsa/pki/index.txt | grep "^V" | cut -d '=' -f 2 | sed -n "$CLIENTNUMBER"p)
|
||||||
cd /etc/openvpn/easy-rsa/
|
cd /etc/openvpn/easy-rsa/ || return
|
||||||
./easyrsa --batch revoke "$CLIENT"
|
./easyrsa --batch revoke "$CLIENT"
|
||||||
EASYRSA_CRL_DAYS=3650 ./easyrsa gen-crl
|
EASYRSA_CRL_DAYS=3650 ./easyrsa gen-crl
|
||||||
# Cleanup
|
# Cleanup
|
||||||
@ -1139,6 +1141,7 @@ function removeUnbound () {
|
|||||||
|
|
||||||
function removeOpenVPN () {
|
function removeOpenVPN () {
|
||||||
echo ""
|
echo ""
|
||||||
|
# shellcheck disable=SC2034
|
||||||
read -rp "Do you really want to remove OpenVPN? [y/n]: " -e -i n REMOVE
|
read -rp "Do you really want to remove OpenVPN? [y/n]: " -e -i n REMOVE
|
||||||
if [[ "$REMOVE" = 'y' ]]; then
|
if [[ "$REMOVE" = 'y' ]]; then
|
||||||
# Get OpenVPN port from the configuration
|
# Get OpenVPN port from the configuration
|
||||||
|
Loading…
x
Reference in New Issue
Block a user