Skip to content

Commit 77188d2

Browse files
authored
Fix sysctl for trixie (#8209)
1 parent de47dfe commit 77188d2

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

install/wireguard-install.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,14 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
3131
cd /etc/wgdashboard/src || exit
3232
chmod u+x wgd.sh
3333
$STD ./wgd.sh install
34-
echo "net.ipv4.ip_forward=1" >>/etc/sysctl.conf
35-
$STD sysctl -p /etc/sysctl.conf
34+
. /etc/os-release
35+
if [ "$VERSION_CODENAME" = "trixie" ]; then
36+
echo "net.ipv4.ip_forward=1" >>/etc/sysctl.d/sysctl.conf
37+
$STD sysctl -p /etc/sysctl.d/sysctl.conf
38+
else
39+
echo "net.ipv4.ip_forward=1" >>/etc/sysctl.conf
40+
$STD sysctl -p /etc/sysctl.conf
41+
fi
3642
msg_ok "Installed WGDashboard"
3743

3844
msg_info "Create Example Config for WGDashboard"

0 commit comments

Comments
 (0)