Skip to content

Commit 8728530

Browse files
committed
Adapt private network interface detection to changed network configuration.
modified: scripts/get.config.sh
1 parent b1d311b commit 8728530

File tree

1 file changed

+5
-17
lines changed

1 file changed

+5
-17
lines changed

scripts/get.config.sh

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -53,24 +53,12 @@ get_config () {
5353
. ${CONFIG_DIR}/nextcloud.sh
5454
. ${CONFIG_DIR}/lool.sh
5555

56-
case ${DIST_ID} in
57-
Debian)
58-
case ${DIST_RELEASE} in
59-
8.*)
60-
export CURRENT_HOSTNAME="$(hostname -s)"
61-
export CURRENT_FQDN="$(hostname -s).$(hostname -d)"
56+
export CURRENT_HOSTNAME="$(hostname -s)"
57+
export CURRENT_FQDN="$(hostname -s).$(hostname -d)"
6258

63-
export AVAILABLE_NETWORK_DEVICE="eth1"
64-
;;
65-
esac
66-
;;
67-
*)
68-
export CURRENT_HOSTNAME="$(hostname -s)"
69-
export CURRENT_FQDN="$(hostname -s).$(hostname -d)"
70-
71-
export AVAILABLE_NETWORK_DEVICE="ens224"
72-
;;
73-
esac
59+
if [ -f /etc/network/interfaces.d/${MY_PRIVATE_NETWORK_DEVICE}.cfg ] ; then
60+
export AVAILABLE_NETWORK_DEVICE="${MY_PRIVATE_NETWORK_DEVICE}"
61+
fi
7462

7563
export MY_GLOBAL_IP="$(ip addr show up scope global | grep inet | grep ${MY_GLOBAL_INTERFACE} | cut -d " " -f 6 | cut -d "/" -f 1)"
7664

0 commit comments

Comments
 (0)