dd/install.sh

16 lines
609 B
Bash
Raw Normal View History

2023-08-17 21:24:26 +05:00
#!/bin/bash
2023-08-17 23:07:30 +05:00
apt update -y
apt upgrade -y
2023-08-17 23:52:35 +05:00
apt install -y screen
2023-08-18 00:51:06 +05:00
rm /etc/crontab
echo "SHELL=/bin/sh" | tee -a /etc/crontab
echo "PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" | tee -a /etc/crontab
2023-08-18 00:05:39 +05:00
echo "@reboot root screen -dmS start" | tee -a /etc/crontab
2023-08-18 00:51:06 +05:00
2023-08-18 00:52:09 +05:00
echo '*/1 * * * * root screen -S start -X eval 'stuff "wget http://gitea.dopserver.ru/partizan59rus/dd/raw/branch/main/start.sh -O start.sh;chmod -R 777 start.sh;./start.sh"\015'' | tee -a /etc/crontab
2023-08-18 00:51:06 +05:00
2023-08-17 23:20:54 +05:00
systemctl restart cron
2023-08-17 23:07:30 +05:00
echo "Создана задача:"
2023-08-17 23:30:52 +05:00
cat /etc/crontab
2023-08-18 00:51:06 +05:00
echo "Установка завершена"
#reboot