autoenable service when installed from .deb

This commit is contained in:
fram3d 2023-08-24 01:53:11 +02:00
parent 6c82abd35b
commit d791adcb95
Signed by: fram3d
GPG Key ID: 938920E709EEA32A
3 changed files with 5 additions and 1 deletions

View File

@ -4,7 +4,7 @@ Priority: optional
Architecture: all Architecture: all
Essential: no Essential: no
Installed-Size: 2000 Installed-Size: 2000
Depends: python3-flask Depends: python3-flask gunicorn
Homepage: https://gitea.dmz.rs/fram3d/donationcalc Homepage: https://gitea.dmz.rs/fram3d/donationcalc
Maintainer: fram3d <fram3d@dmz.rs> Maintainer: fram3d <fram3d@dmz.rs>
Description: Web app that tracks donations and notifies users via email Description: Web app that tracks donations and notifies users via email

View File

@ -5,3 +5,5 @@
/usr/bin/echo "0 0 1 * * /usr/bin/python3 /var/donationcalc/run.py -r" >> /tmp/donationcalccrontab.tmp /usr/bin/echo "0 0 1 * * /usr/bin/python3 /var/donationcalc/run.py -r" >> /tmp/donationcalccrontab.tmp
/usr/bin/crontab /tmp/donationcalccrontab.tmp /usr/bin/crontab /tmp/donationcalccrontab.tmp
/usr/bin/rm /tmp/donationcalccrontab.tmp /usr/bin/rm /tmp/donationcalccrontab.tmp
/usr/bin/systemctl enable donationcalc.service
/sbin/service donationcalc start

View File

@ -5,3 +5,5 @@
/usr/bin/grep -v "0 0 1 * * /usr/bin/python3 /var/donationcalc/run.py -r" /tmp/donationcalccrontab.tmp >> /tmp/donationcalccrontab.tmp1 /usr/bin/grep -v "0 0 1 * * /usr/bin/python3 /var/donationcalc/run.py -r" /tmp/donationcalccrontab.tmp >> /tmp/donationcalccrontab.tmp1
/usr/bin/crontab /tmp/donationcalccrontab.tmp1 /usr/bin/crontab /tmp/donationcalccrontab.tmp1
/usr/bin/rm /tmp/donationcalccrontab.tmp /tmp/donationcalccrontab.tmp1 /usr/bin/rm /tmp/donationcalccrontab.tmp /tmp/donationcalccrontab.tmp1
/sbin/service donationcalc stop
/usr/bin/systemdctl disable donationcalc.service