Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 20 lines (16 sloc) 468 Bytes
#!/bin/bash
#--- Check if script is executed in SUDO context ---
if [ $(id -u) != 0 ]; then
echo "Please use \"sudo\" to run this script."
exit 1
fi
if [ $(docker ps -a -f name=cups-zhaw | grep -c cups-zhaw) != 0 ]; then
docker rm -f cups-zhaw
fi
if [ $(docker ps -a -f name=cups | grep -c cups) != 0 ]; then
docker rm -f cups
fi
if [ $(lpstat -v 2>/dev/null | grep -c FollowMe) != 0 ]; then
lpadmin -x FollowMe
echo "Printer has been uninstalled."
fi
You can’t perform that action at this time.