| Server IP : 93.86.61.54 / Your IP : 216.73.216.60 Web Server : Apache/2.4.62 (Ubuntu) System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64 User : www-data ( 33) PHP Version : 8.4.22 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/ubuntu-fan/ |
Upload File : |
#!/bin/sh -
#
# All interfaces managed by ifupdown get their Fan bridges configured by
# the ifupdown hook, so here we only care about interfaces controlled by
# systemd-networkd (FIXME: Networkmanager?)
#
networkd_interfaces() {
if [ "$(type networkctl 2>&1|grep 'not found')" != "" ]; then
return
fi
networkctl 2>/dev/null |
awk '$4=="routable" && $5=="configured"{print $2}'
}
networkd_cmd() {
local CMD="$1"
local IFACE
for IFACE in $(networkd_interfaces); do
fanctl net $CMD $IFACE
done
}
# See how we were called.
case "$1" in
start)
networkd_cmd start
;;
stop)
networkd_cmd stop
;;
restart|reload|force-reload)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart|reload|force-reload}"
exit 2
esac
exit $?