#!/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#
