Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sources
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FOUREL Timothee
sources
Commits
44903e1c
Commit
44903e1c
authored
2 years ago
by
FOUREL Timothee
Browse files
Options
Downloads
Patches
Plain Diff
Add support for LIEC printer
parent
c82b2e1d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
IMP-AIG-UNIX/IMP-AIG-LIEC.sh
+27
-0
27 additions, 0 deletions
IMP-AIG-UNIX/IMP-AIG-LIEC.sh
with
27 additions
and
0 deletions
IMP-AIG-UNIX/IMP-AIG-LIEC.sh
0 → 100644
+
27
−
0
View file @
44903e1c
#!/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"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment