Posts

Showing posts from August, 2012

Auto turn off wifi when cable connected

Script ini akan mematikan wifi secara otomatis, saat koneksi menggunakan kabel (ethernet) aktif. Saat kabel disconnect, wifi akan aktif kembali. Buat file /etc/NetworkManager/dispatcher.d/99khad: #!/bin/sh myname=$(basename "$0") || exit 1 log() { logger -p user.info -t "${myname}[$$]" "$*"; } IFACE=$1 ACTION=$2 case ${IFACE} in     eth0)         case ${ACTION} in             up) nmcli nm wifi off                 ;;             down) nmcli nm wifi on                 ;;         esac         ;;     wlan0)         case ${ACTION} in             up)                 ;;             down)           ...