reminder-bot/debian/postinst

16 lines
328 B
Plaintext
Raw Normal View History

#!/bin/bash
set -e
id -u reminder &>/dev/null || useradd -r -M reminder
if [ ! -f '/etc/reminder-rs/config.env' ]; then
echo "Copying configuration file..."
cp /etc/reminder-rs/default.env /etc/reminder-rs/config.env
fi
chown reminder /etc/reminder-rs/config.env
chown reminder /etc/reminder-rs/Rocket.toml
#DEBHELPER#