add wol setup
This commit is contained in:
parent
25dee0f7a8
commit
4613a40ba0
1 changed files with 19 additions and 0 deletions
19
setup/wol
Executable file
19
setup/wol
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# run as sudo so it ask for the password here and not inside FZF
|
||||
echo -e "\n${BLD}${SUL}${GRN}Setting up wol...${RST}\n"
|
||||
|
||||
interface="$(
|
||||
nmcli --fields name --terse con show |
|
||||
fzf \
|
||||
--height 10 \
|
||||
--header 'Select network interface' \
|
||||
--preview 'nmcli c show {} | grep 802-3-ethernet.wake-on-lan'
|
||||
)"
|
||||
|
||||
if [[ -z "$interface" ]]; then
|
||||
echo "no interface selected"
|
||||
exit
|
||||
fi
|
||||
nmcli c modify "$interface" 802-3-ethernet.wake-on-lan magic
|
||||
nmcli c modify "$interface" 802-3-ethernet.auto-negotiate yes
|
||||
Loading…
Add table
Add a link
Reference in a new issue