1 2 3 4 5 6
#!/usr/bin/env sh case "$3" in plug) amixer sset Speaker off ;; unplug) amixer sset Speaker on ;; esac