-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathstart_cups.sh
More file actions
executable file
·29 lines (27 loc) · 886 Bytes
/
start_cups.sh
File metadata and controls
executable file
·29 lines (27 loc) · 886 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#! /bin/sh
#
# Start docker image that provides a CUPS instance
#
# Author: Thomas Bendler <project@bendler-net.de>
# Date: Sat Dec 8 15:46:29 CET 2018
#
# Release: v1.3
#
# ChangeLog: v0.1 - Initial release
# v1.2 - First production ready release (align with image version)
# v1.3 - Add avahi
#
### Set standard password if not set with local environment variable ###
if [ -n "${CUPS_PASSWORD}" ]; then
CUPS_PASSWORD=password
fi
### Run docker instance ###
docker run --detach --restart always \
--cap-add=SYS_ADMIN -e "container=docker" \
-e CUPS_ENV_HOST="$(hostname -f)" \
-e CUPS_ENV_PASSWORD="${CUPS_PASSWORD}" \
-e CUPS_ENV_DEBUG="${CUPS_DEBUG}" \
--name cups --hostname cups.$(hostname -f | sed -e 's/^[^.]*\.//') \
-p 137:137/udp -p 139:139/tcp -p 445:445/tcp \
-p 631:631/tcp -p 5353:5353/udp \
thbe/cups