#!/bin/sh : ${ttrss_username:='s-ttrss'} : ${ttrss_dbname:='ttrss'} : ${ttrss_dbhost:="$postgres_host"} : ${ttrss_fqdn:="$fqdn"} : ${ttrss_access_role:='ttrss-access'} : ${ttrss_admin_role:='ttrss-admin'} : ${ttrss_mail_from:="ttrss-noreply@${email_domain}"} ttrss_dn="uid=${ttrss_username},${robots_basedn}" ttrss_https_cert="${nginx_conf_dir}/ttrss.crt" ttrss_https_key="${nginx_conf_dir}/ttrss.key" ttrss_repo='https://git.tt-rss.org/fox/tt-rss.git/' ttrss_branch=master ttrss_repo_dir=/usr/local/www/tt-rss ttrss_keytab="${keytab_dir}/ttrss.keytab" ttrss_client_keytab="${keytab_dir}/ttrss.client.keytab" ttrss_fpm_socket=/var/run/fpm-ttrss.sock # Install required packages. pkg install -y \ ca_root_nss \ nginx \ git-lite \ php${php_version}-ctype \ php${php_version}-curl \ php${php_version}-dom \ php${php_version}-exif \ php${php_version}-fileinfo \ php${php_version}-filter \ php${php_version}-gd \ php${php_version}-iconv \ php${php_version}-intl \ php${php_version}-ldap \ php${php_version}-mbstring \ php${php_version}-opcache \ php${php_version}-pcntl \ php${php_version}-pdo \ php${php_version}-pdo_pgsql \ php${php_version}-pgsql \ php${php_version}-phar \ php${php_version}-posix \ php${php_version}-session \ php${php_version}-simplexml \ php${php_version}-sockets \ php${php_version}-tokenizer \ php${php_version}-xml \ php${php_version}-xmlwriter \ php${php_version}-zip # Create ttrss principal and keytab. ldap_add "$ttrss_dn" < /usr/local/etc/php-fpm.d/www.conf # Enable and start daemons. sysrc -v \ nginx_enable=YES \ php_fpm_enable=YES \ ttrssd_enable=YES service nginx restart service php_fpm restart service ttrssd restart # Create roles. for role in "$ttrss_access_role" "$ttrss_admin_role"; do ldap_add "cn=${role},${roles_basedn}" <