#!/bin/bash

if [ -e /tmp/smarties-config.json ]
then
    rm -Rf /var/smarties/data/config.json
    mv /tmp/smarties-config.json /var/smarties/data/config.json
fi

systemctl daemon-reload
systemctl enable smarties
systemctl restart smarties
echo ""
echo "smarties.io has been successfully installed !"
echo ""
echo "How to use ?"
echo "Open a web browser on your computer and go to https://me.smarties.io/ to start, with the username 'admin' and password 'admin' !"
echo ""
