blob: a89378066adfc7c8abeac11088e790095aafceb0 (
plain)
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
30
31
32
33
34
35
36
37
38
|
_printcap='/etc/lprng/printcap'
_service='lpd.service'
_post_ui() {
set -u
systemctl daemon-reload
if systemctl -q is-active 'org.cups.cups-lpd.socket'; then
echo 'You may need to disable cups-lpd with'
echo " systemctl disable --now 'org.cups.cups-lpd.socket'"
fi
if ! systemctl -q is-enabled "${_service}"; then
echo 'Enable your lpd server with'
echo " sudo systemctl enable --now '${_service}'"
fi
if ! grep -qe '^[a-zA-Z]' "${_printcap}"; then
echo "Add some printers to ${_printcap}"
fi
set +u
}
post_upgrade() {
_post_ui
}
post_install() {
_post_ui
}
pre_remove() {
set -u
systemctl stop "${_service}"
systemctl disable "${_service}"
set +u
}
post_remove() {
systemctl daemon-reload
}
|