New backup 2024-10-29 14:59:27

This commit is contained in:
Penelope Gwen 2024-10-29 14:59:27 -07:00
parent c1c7c86b07
commit f4de287bed
2 changed files with 17 additions and 0 deletions

View file

@ -0,0 +1,16 @@
#!/bin/bash
ovpn_file="${1}"
ovpn_name="${2}"
[ -f "${ovpn_file}" ] || exit
[ -z "${ovpn_name}" ] && basename -s .ovpn "${ovpn_file}"
read -p "Username: " ovpn_user
read -p "Password: " -s ovpn_pass;printf "\n"
nmcli connection import type openvpn file "${ovpn_file}"
nmcli connection modify `basename -s .ovpn "${ovpn_file}"` con-name "${ovpn_name}"
nmcli connection modify "${ovpn_name}" +vpn.data username="${ovpn_user}"
nmcli connection modify "${ovpn_name}" +vpn.data password-flags=0
nmcli connection modify "${ovpn_name}" +vpn.secrets password="${ovpn_pass}"

View file

@ -1,3 +1,4 @@
.sapphrc/default
.config/hyfetch.json
.gitconfig
Scripts/ovpn-import.sh