mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-02 05:44:03 +02:00
Merge pull request #2466 from alexbelgium/codex/limit-interface-name-to-15-characters
Limit qBittorrent VPN interface names to 15 characters
This commit is contained in:
@@ -61,6 +61,10 @@ interface_name="$(basename "${wireguard_config}" .conf)"
|
|||||||
if [[ -z "${interface_name}" ]]; then
|
if [[ -z "${interface_name}" ]]; then
|
||||||
interface_name='wg0'
|
interface_name='wg0'
|
||||||
fi
|
fi
|
||||||
|
if [[ ${#interface_name} -gt 15 ]]; then
|
||||||
|
bashio::log.warning "WireGuard interface name '${interface_name}' exceeds 15 characters; truncating to '${interface_name:0:15}'."
|
||||||
|
interface_name="${interface_name:0:15}"
|
||||||
|
fi
|
||||||
|
|
||||||
wireguard_runtime_config="${WIREGUARD_STATE_DIR}/${interface_name}.conf"
|
wireguard_runtime_config="${WIREGUARD_STATE_DIR}/${interface_name}.conf"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user