mirror of
https://github.com/ilyakooo0/xmrig-bash-scripts.git
synced 2024-11-22 12:31:57 +03:00
07a3b08664
a rough and ready version
30 lines
720 B
Bash
Executable File
30 lines
720 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Set values in settings script
|
|
|
|
echo "#################################"
|
|
echo " UPDATING CRONTAB"
|
|
echo "#################################"
|
|
|
|
|
|
# Remove existing crontab
|
|
echo "Backup existing crontab"
|
|
crontab -l > crontab
|
|
|
|
echo "Removing exiting crontab"
|
|
crontab -r
|
|
|
|
# Setup users contab
|
|
crontab -l | { cat; echo "#Start at $_USER_TIMESTART on days $_USER_CRONDAYS
|
|
0 $_USER_CRONSTART * * $_USER_CRONDAYS $_WORK_DIR/start.sh"; } | crontab -
|
|
|
|
crontab -l | { cat; echo "#Stop at $_USER_TIMESTOP on days $_USER_CRONDAYS
|
|
0 $_USER_CRONSTOP * * $_USER_CRONDAYS $_WORK_DIR/stop.sh"; } | crontab -
|
|
|
|
crontab -l
|
|
|
|
echo "#################################"
|
|
echo " CRONTAB UPDATED"
|
|
echo "#################################"
|
|
|