mirror of
https://github.com/vvzvlad/vestasync.git
synced 2024-11-05 14:59:12 +03:00
11 lines
258 B
Bash
11 lines
258 B
Bash
#!/bin/bash
|
|
macs_dir="/mnt/data/etc/vestasync/macs"
|
|
|
|
for mac_file in "$macs_dir"/*; do
|
|
ifname=$(basename "$mac_file")
|
|
if [ -f "$mac_file" ]; then
|
|
mac_address=$(cat "$mac_file")
|
|
ip link set "$ifname" address "$mac_address"
|
|
fi
|
|
done
|