Ahenk/usr/share/ahenk/plugins/usb/scripts/DISABLED_printer.sh

14 lines
176 B
Bash
Raw Normal View History

#!/bin/bash
var=$(lsmod | awk '{print $1}'| grep usblp)
service cups stop
if [[ -z "$var" ]]
then
echo "USB printer devices are already blocked"
else
rmmod usblp
sleep 2
fi