diff options
author | Cullum Smith <cullum@sacredheartsc.com> | 2024-10-13 22:43:31 -0400 |
---|---|---|
committer | Cullum Smith <cullum@sacredheartsc.com> | 2024-10-13 22:43:31 -0400 |
commit | b2af400a1098ebf445575d169e11a6717867045f (patch) | |
tree | dc1f453a9366e0ba9fe07858dd95a7ba363047a6 /scripts/hostclass | |
parent | 99b8524c16cc99ceeaf1ebf588f2fc0f2c0fbe0a (diff) | |
download | infrastructure-b2af400a1098ebf445575d169e11a6717867045f.tar.gz |
add cups
Diffstat (limited to 'scripts/hostclass')
-rw-r--r-- | scripts/hostclass/cups_server | 25 | ||||
-rw-r--r-- | scripts/hostclass/znc_server | 3 |
2 files changed, 27 insertions, 1 deletions
diff --git a/scripts/hostclass/cups_server b/scripts/hostclass/cups_server new file mode 100644 index 0000000..e3ad928 --- /dev/null +++ b/scripts/hostclass/cups_server @@ -0,0 +1,25 @@ +#!/bin/sh + +: ${cups_admin_group='sysadmins'} +: ${cups_server_admin="${cups_admin_group}@${email_domain}"} + +cups_user=cups +cups_conf_dir=/usr/local/etc/cups +cups_tls_dir=${cups_conf_dir}/ssl +cups_tls_cert="${cups_tls_dir}/${fqdn}.crt" +cups_tls_key="${cups_tls_dir}/${fqdn}.key" + +# Install required packages. +pkg install -y cups cups-filters + +# Copy TLS certificate for CUPS. +install_certificate -g "$cups_user" cups "$cups_tls_cert" +install_certificate_key -g "$cups_user" cups "$cups_tls_key" + +# Copy CUPS configuration. +install_template -o root -g "$cups_user" -m 0640 \ + "${cups_conf_dir}/cupsd.conf" \ + "${cups_conf_dir}/cups-files.conf" + +sysrc -v cupsd_enable=YES +service cupsd restart diff --git a/scripts/hostclass/znc_server b/scripts/hostclass/znc_server index c9f3780..fd6b715 100644 --- a/scripts/hostclass/znc_server +++ b/scripts/hostclass/znc_server @@ -41,6 +41,7 @@ install_template -o "$znc_user" -g "$znc_user" -m 0600 "${znc_home}/moddata/cyru # TODO: use ldap module for saslauthd. install_template -m 0644 \ /usr/local/lib/sasl2/znc.conf \ + /usr/local/etc/saslauthd.conf \ /etc/pam.d/znc # Allow znc to read the saslauthd socket. @@ -53,7 +54,7 @@ install_template -m 0644 \ sysrc -v \ saslauthd_enable=YES \ - saslauthd_flags='-a pam' \ + saslauthd_flags='-a ldap' \ znc_enable=YES \ nginx_enable=YES |