-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CUPS] Rewrite based on @zajac-grzegorz work
- Loading branch information
1 parent
932affd
commit 3656399
Showing
29 changed files
with
174 additions
and
180 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,51 @@ | ||
ARG BUILD_FROM | ||
FROM $BUILD_FROM | ||
|
||
LABEL io.hass.version="1" io.hass.type="addon" io.hass.arch="armhf|aarch64|i386|amd64" | ||
LABEL io.hass.version="1.0" io.hass.type="addon" io.hass.arch="aarch64|amd64" | ||
|
||
# Set shell | ||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
sudo \ | ||
locales \ | ||
cups \ | ||
avahi-daemon \ | ||
libnss-mdns \ | ||
dbus \ | ||
colord \ | ||
printer-driver-all-enforce \ | ||
printer-driver-all \ | ||
printer-driver-gutenprint \ | ||
openprinting-ppds \ | ||
hpijs-ppds \ | ||
hp-ppd \ | ||
hplip \ | ||
printer-driver-foo2zjs \ | ||
cups-pdf \ | ||
gnupg2 \ | ||
lsb-release \ | ||
nano \ | ||
samba \ | ||
bash-completion \ | ||
nginx \ | ||
procps \ | ||
&& apt-get clean -y \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
COPY rootfs / | ||
|
||
# Corrects permissions for s6 v3 | ||
RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \ | ||
if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \ | ||
if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi | ||
# Add user and disable sudo password checking | ||
RUN useradd \ | ||
--groups=sudo,lp,lpadmin \ | ||
--create-home \ | ||
--home-dir=/home/print \ | ||
--shell=/bin/bash \ | ||
--password=$(mkpasswd print) \ | ||
print \ | ||
&& sed -i '/%sudo[[:space:]]/ s/ALL[[:space:]]*$/NOPASSWD:ALL/' /etc/sudoers | ||
|
||
EXPOSE 631 445 137 139 | ||
EXPOSE 631 | ||
|
||
RUN chmod a+x /run.sh | ||
|
||
CMD ["/run.sh"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
# Home Assistant Add-on: CUPS Printer server | ||
**Based on the work of [zajac-grzegorz](https://github.com/zajac-grzegorz/homeassistant-addon-cups-airprint) - thanks for letting me steal it ❤️** | ||
|
||
<a href='https://ko-fi.com/MaxWinterstein' target='_blank'><img height='35' style='border:0px;height:46px;' src='https://az743702.vo.msecnd.net/cdn/kofi3.png?v=0' border='0' alt='Buy Me a Coffee at ko-fi.com'></a> | ||
--- | ||
|
||
## Credits | ||
Original README.md | ||
|
||
This Add-On is based on the work of https://github.com/Luk164/addon-repository - and just slighty adjusted to make it work. Thanks <3 | ||
# homeassistant addon cups airprint | ||
CUPS addon with working Avahi in reflector mode | ||
|
||
## Known Issues 🚨 | ||
Tested with Home Assistant version **2023.9** | ||
|
||
- mDNS is not working, therefore e.g. printeres are not announced via Avahi / Bonjour - see [#128](https://github.com/MaxWinterstein/homeassistant-addons/issues/128) | ||
- Ingress is not working, so I disabled it for now. Please access the Webinterface via port 631, e.g. https://192.168.1.2:631 - see [#129](https://github.com/MaxWinterstein/homeassistant-addons/issues/129) | ||
CUPS administrator login: **print**, password: **print** (can be changed in the Dockerfile) | ||
|
||
Configuration data is stored in **/data/cups** folder | ||
|
||
[![Open your Home Assistant instance and show the add add-on repository dialog with a specific repository URL pre-filled.](https://my.home-assistant.io/badges/supervisor_add_addon_repository.svg)](https://my.home-assistant.io/redirect/supervisor_add_addon_repository/?repository_url=https%3A%2F%2Fgithub.com%2Fzajac-grzegorz%2Fhomeassistant-addon-cups-airprint) |
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
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
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
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.