diff --git a/arch-graphical-install-auto b/arch-graphical-install-auto index a99f16e..89d9e1a 100755 --- a/arch-graphical-install-auto +++ b/arch-graphical-install-auto @@ -586,6 +586,13 @@ chmod +x /usr/bin/aurupdater # setcap-ping setcap cap_net_raw+ep /bin/ping +# openvpn-reconnect + +cp /opt/${repo}/openvpn-reconnect /usr/bin/openvpn-reconnect +chmod +x /usr/bin/openvpn-reconnect +cp /opt/${repo}/openvpn-reconnect-systemd.sh /usr/lib/systemd/system-sleep/openvpn-reconnect-systemd.sh +chmod +x /usr/lib/systemd/system-sleep/openvpn-reconnect-systemd.sh + su "$username" -c "aurinstaller "https://aur.archlinux.org/pamac-aur.git"" if [ "$version" != "pi" ] && [ "$packageupdate" != "skip" ]; then su "$username" -c "aurinstaller "https://aur.archlinux.org/plymouth.git"" diff --git a/openvpn-reconnect b/openvpn-reconnect new file mode 100755 index 0000000..4207b6d --- /dev/null +++ b/openvpn-reconnect @@ -0,0 +1,6 @@ +#!/bin/sh +if [ "$(id -u)" != 0 ]; then + >&2 echo "$0 must be run with root privileges!" + exit 1 +fi +pkill --signal SIGHUP --exact openvpn diff --git a/openvpn-reconnect-systemd.sh b/openvpn-reconnect-systemd.sh new file mode 100755 index 0000000..50b5055 --- /dev/null +++ b/openvpn-reconnect-systemd.sh @@ -0,0 +1,4 @@ +#!/bin/sh +if [ "$1" == "post" ]; then + openvpn-reconnect +fi