git.iko.soy/xmrig-bash-scripts
on master help sign in
provide easy way to enable/disable user crontab
commit272b4f186dca216bd8d2a88b1b60220248d229d1 authorSean Wheller <sean@prepaidmeters.com> dateThu 8 Aug 2019, 20:40 (7 years ago) parent2d34d17
2 files changed+37
crontab-off.sh+18 crontab-on.sh+19
crontab-off.shnew file+18
@@ -0,0 +1,18 @@
1+#!/bin/bash
2+
3+echo "#################################"
4+echo "# DISABLING CRONTAB #"
5+echo "#################################"
6+
7+
8+# Remove existing crontab
9+echo "Backup existing crontab"
10+crontab -l > crontab
11+
12+echo "Removing exiting crontab"
13+crontab -r
14+
15+echo "#################################"
16+echo "# CRONTAB DISABLED #"
17+echo "#################################"
18+
crontab-on.shnew file+19
@@ -0,0 +1,19 @@
1+#!/bin/bash
2+
3+echo "####################################"
4+echo "# ENABLING CRONTAB #"
5+echo "####################################"
6+
7+# Get settings
8+. settings.sh
9+. functions.sh
10+sleep 5
11+
12+# Setup crontab for user
13+. crontab.sh
14+sleep 5
15+
16+echo "####################################"
17+echo "# CRONTAB ENABLED #"
18+echo "####################################"
19+