2020-03-05 17:07:37 +00:00
|
|
|
#! /usr/bin/env bash
|
2020-06-22 09:54:01 +00:00
|
|
|
|
|
|
|
set -e # exit on first error
|
2020-03-05 17:07:37 +00:00
|
|
|
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get -y install python3-pip
|
|
|
|
|
|
|
|
pip3 install discord.py
|
2020-03-06 15:11:42 +00:00
|
|
|
pip3 install python-dotenv
|
2020-03-05 17:07:37 +00:00
|
|
|
|
2020-06-22 09:54:01 +00:00
|
|
|
downloadCheck="0 0,8,16 * * * /home/user/skynet-webportal/setup-scripts/funds-checker.py /home/user/.sia/sia.env"
|
|
|
|
uploadCheck="0 0,8,16 * * * /home/user/skynet-webportal/setup-scripts/funds-checker.py /home/user/.sia/sia-upload.env"
|
2020-03-09 20:01:41 +00:00
|
|
|
|
2020-06-22 09:54:01 +00:00
|
|
|
logCheck1="0 0,8,16 * * * /home/user/skynet-webportal/setup-scripts/log-checker.py /home/user/.sia/sia.env siad 8"
|
|
|
|
logCheck2="0 0,8,16 * * * /home/user/skynet-webportal/setup-scripts/log-checker.py /home/user/.sia/sia-upload.env siad-upload 8"
|
2020-03-05 17:07:37 +00:00
|
|
|
|
2020-03-05 17:10:35 +00:00
|
|
|
(crontab -u user -l; echo "$downloadCheck" ) | crontab -u user -
|
2020-03-05 17:17:25 +00:00
|
|
|
(crontab -u user -l; echo "$uploadCheck" ) | crontab -u user -
|
2020-03-09 20:01:41 +00:00
|
|
|
|
|
|
|
(crontab -u user -l; echo "$logCheck1" ) | crontab -u user -
|
|
|
|
(crontab -u user -l; echo "$logCheck2" ) | crontab -u user -
|