Making your Wake-on-LAN settings persistent in Ubuntu

user warning: Table './drinking_drpl2/watchdog' is marked as crashed and last (automatic?) repair failed query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'flickr', 'Could not connect to Flickr, Error: Forbidden', 'a:0:{}', 4, '', 'http://rothwerx.com/content/making-your-wake-lan-settings-persistent-ubuntu', '', '104.196.217.246', 1513158833) in /home1/drinking/public_html/rothwerx/modules/dblog/dblog.module on line 146.

Jeremiah - Posted on 03 March 2008

Create a script /etc/network/if-up.d/wol-enable with this in it:
 
#!/bin/bash
/usr/bin/sudo /usr/sbin/ethtool -s eth0 wol g