Skip to content
Snippets Groups Projects
Commit 44903e1c authored by FOUREL Timothee's avatar FOUREL Timothee
Browse files

Add support for LIEC printer

parent c82b2e1d
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
driverName='TSES6D_1.PPD'
url='https://gitlab.univ-lorraine.fr/fourel1/sources/-/raw/main/IMP-AIG-UNIX/Copieur-TOSHIBA/'$driverName'?inline=false'
sha256='f3a335226c1a4b8dfab47e914b9ee8a80d1353b76936eb567e0ac0560afe6f20'
driverFolder='/etc/cups/ppd/'$driverName
if [[ $(id -u) -ne 0 ]];then
echo "Please run as root"
exit 1
fi
echo "Enabling the CUPS web interface"
/usr/sbin/cupsctl WebInterface=Yes
if [ ! -f "$driverFolder" ];then
echo "Downloading the Driver"
/usr/bin/curl $url -o $driverFolder
fi
if [[ ! $(/usr/bin/shasum -a 256 $driverFolder | awk '{print $1}') == "$sha256" ]];then
echo "Invalid checksum"
echo "Please remove the driver \"$driverFolder\" and try again"
exit 2
fi
echo "The driver has been succesfully installed"
echo "Installing LIEC's Printer"
/usr/sbin/lpadmin -p AIG-LIEC-niveau7-couleur -L "entree 1B niveau 7" -E -v lpd://liec-fst-c01.liec.site.univ-lorraine.fr -P $driverFolder -o printer-is-shared=false
echo "Operation completed"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment