diff options
author | Cullum Smith <cullum@sacredheartsc.com> | 2024-10-04 21:59:59 -0400 |
---|---|---|
committer | Cullum Smith <cullum@sacredheartsc.com> | 2024-10-04 21:59:59 -0400 |
commit | 1e088983f6a80b6fd47543d0b4989e9ddb3234d5 (patch) | |
tree | 16af4205d84c9194257887e5e54653f79e96f987 /scripts/hostclass/imap_server/20-tika | |
parent | a1bddcb1de1053994fb445267ca5d1ffaecb0fb5 (diff) | |
download | infrastructure-1e088983f6a80b6fd47543d0b4989e9ddb3234d5.tar.gz |
add imap stuff
Diffstat (limited to 'scripts/hostclass/imap_server/20-tika')
-rw-r--r-- | scripts/hostclass/imap_server/20-tika | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/scripts/hostclass/imap_server/20-tika b/scripts/hostclass/imap_server/20-tika new file mode 100644 index 0000000..3b4aa47 --- /dev/null +++ b/scripts/hostclass/imap_server/20-tika @@ -0,0 +1,38 @@ +#!/bin/sh + +: ${tika_version:='2.9.2'} +: ${tika_uid:='787'} + +tika_user=tika +tika_conf_dir=/usr/local/etc/tika +tika_install_dir=/usr/local/tika +tika_heap_size=2g +tika_port=9998 +tika_url="https://dlcdn.apache.org/tika/${tika_version}/tika-server-standard-${tika_version}.jar" + +# Add local tika user. +add_user \ + -u "$tika_uid" \ + -c 'Apache Tika' \ + -d /nonexistent \ + -s /usr/sbin/nologin \ + "$tika_user" + +# Create tika install/config directories. +install_directory -m 0755 \ + "$tika_install_dir" \ + "$tika_conf_dir" + +# Download tika jar file. +curl -fL -o "${tika_install_dir}/tika.jar" "$tika_url" + +# Copy tika rc script. +install_file -m 0555 /usr/local/etc/rc.d/tika + +# Copy tika config files. +install_template -m 0644 "${tika_conf_dir}/config.xml" +install_file -m 0644 "${tika_conf_dir}/log4j2.xml" + +# Enable and start tika. +sysrc -v tika_enable=YES +service tika restart |