#!/bin/bash
pip3 install huey==0.4.9
pip3 install redis

systemctl enable tisbackup_huey
systemctl enable tisbackup_gui

if [ ! -f /usr/bin/tisbackup ]; then
    ln -s /opt/tisbackup/tisbackup.py  /usr/bin/tisbackup
fi

if [ ! -f /etc/cron.d/tisbackup ]; then
    cp  /opt/tisbackup/samples/tisbackup.cron  /etc/cron.d/tisbackup
fi

find /opt/tisbackup -name "*.pyc" -exec rm -rf {} \;
python3 -m compileall  /opt/tisbackup/
