Hello,
I'm trying to create a startup script for following tcpdump command:
tcpdump -i eth1.1 -l arp and ether[0x26:1]=192 and ether[0x27:1]=168 and ether[0x28:1]=1 and ether[0x29:1]=200|while read -r line; do etherwake -i eth1.1 00:00:00:00:00:00; done&
(MAC is empty for privacy )
This script sends a wake on lan magic packet to the destination host, when a client is accessing it (over web or smb for example). The script works fine, but not at boot.
I tried creating a script, which looks like following:
#!/bin/sh /etc/rc.common
START=99
USE_PROCD=1
COMMAND="tcpdump -i eth1.1 -l arp and ether[0x26:1]=192 and ether[0x27:1]=168 and ether[0x28:1]=1 and ether[0x29:1]=200|while read -r line; do etherwake -i eth1.1 00:00:00:00:00:00; done&"
start_service() {
procd_open_instance
procd_set_param command $COMMAND
}
Can someone help to get this working?
(Last edited by asldjlajhdwat on 28 Aug 2017, 21:43)