iports/ilot/listmonk/listmonk.post-install

33 lines
756 B
Bash

#!/bin/sh
set -eu
setcap 'cap_net_bind_service=+ep' /usr/share/webapps/listmonk/listmonk
if [ "${0##*.}" = 'post-upgrade' ]; then
cat >&2 <<-EOF
*
* To finish Listmonk upgrade run:
*
* listmonk --upgrade
*
* If upgrading from v3.0.0, please first set the following env variables:
*
* export LISTMONK_ADMIN_USER=your-admin-user
* export LISTMONK_ADMIN_PASSWORD=your-admin-password
* listmonk --upgrade
*
EOF
else
cat >&2 <<-EOF
*
* 1. Adjust settings in /etc/listmonk/config.toml.
*
* 2. Create database for Listmonk:
*
* psql -c "CREATE ROLE listmonk PASSWORD 'top-secret' INHERIT LOGIN;"
* psql -c "CREATE DATABASE listmonk OWNER listmonk ENCODING 'UTF-8';"
*
* 3. Run "listmonk --install"
*
EOF
fi