diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2021-10-14 20:39:22 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2021-10-14 20:58:31 (EDT) |
commit | 17266b7325023e740ea2c07104eb77240fff692e (patch) | |
tree | 2f5bb6a31be2eb308720daa256fd116d9f31eb97 | |
parent | a38419b40678c20ed0d6380e545512027a96af7c (diff) | |
download | pc-inst-17266b7325023e740ea2c07104eb77240fff692e.zip pc-inst-17266b7325023e740ea2c07104eb77240fff692e.tar.gz pc-inst-17266b7325023e740ea2c07104eb77240fff692e.tar.bz2 |
print1: Set up print queues watcher
-rw-r--r-- | hosts/print1/postinst | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/hosts/print1/postinst b/hosts/print1/postinst index 8ab7e62..1e80152 100644 --- a/hosts/print1/postinst +++ b/hosts/print1/postinst @@ -24,10 +24,28 @@ sed 's/^.*\(HandleLidSwitch.*\)=.*$/\1=ignore/' \ "${target}/etc/elogind/logind.conf.dist" \ 1>"${target}/etc/elogind/logind.conf" +# Create print queues directory. +mkdir "${target}/var/spool/printq" +chgrp 7 "${target}/var/spool/printq" +chmod g+s "${target}/var/spool/printq" + # Configure NFS. mv "${target}/etc/exports" "${target}/etc/exports.dist" cat 1>"${target}/etc/exports" 0<<-EOF + /var/spool/printq 192.168.10.0/255.255.255.0(rw,sync,no_subtree_check,root_squash) + EOF + +# Set up printq. +wget -O "${target}/usr/local/bin/printq" \ + 'http://git.pehjota.net/printq/printq.git/plain/printq' +chmod a+x "${target}/usr/local/bin/printq" +mkdir "${target}/etc/boot.d" +cat 1>"${target}/etc/boot.d/printq" 0<<-EOF + #!/bin/sh + + sudo -b -u lp /usr/local/bin/printq /var/spool/printq EOF +chmod a+x "${target}/etc/boot.d/printq" # Harden SSH server. mv "${target}/etc/ssh/sshd_config" "${target}/etc/ssh/sshd_config.dist" |