Last active
November 27, 2024 15:17
-
-
Save gamma/a089aed5277cc727f9ccee01c4f8d1c6 to your computer and use it in GitHub Desktop.
Install alpine PDF printer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# run with: | |
# curl -sSL https://gist.githubusercontent.com/gamma/a089aed5277cc727f9ccee01c4f8d1c6/raw | sh -- | |
# Add testing repo | |
echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories | |
# Install cups | |
apk add cups cups-libs cups-pdf@testing cups-client cups-filters hplip@testing | |
# Add user root to group lpadmin | |
addgroup root lpadmin | |
# run cups | |
cupsd | |
# add PDF printer as default | |
lpadmin -p cups-pdf -v cups-pdf:/ -E -P /usr/share/ppd/cups-pdf/cups-pdf.ppd && lpadmin -d cups-pdf | |
ps xo pid,command | grep exitcode | grep -v grep | awk '{print $1}' | xargs -r kill -TERM |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment