You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
590 B
18 lines
590 B
9 years ago
|
#!/bin/sh
|
||
9 years ago
|
#sudo su -
|
||
9 years ago
|
# NOTE: this works only since user is a field on Ubuntu (on some GNU/Linux systems it is not, which is implied by omission at http://www.adminschoice.com/crontab-quick-reference)
|
||
|
# Minute, Hour, Day of Month, Month (1 to 12), Day of Week
|
||
|
# m h dom mon dow user command
|
||
9 years ago
|
|
||
9 years ago
|
cd ~
|
||
|
MT_CHUNKYMAP_CRON_TMP=mts_cron.tmp
|
||
9 years ago
|
if [ ! -f "crontab.1st" ];
|
||
9 years ago
|
then
|
||
9 years ago
|
cp /etc/crontab "crontab.1st"
|
||
9 years ago
|
fi
|
||
|
crontab -l > "$MT_CHUNKYMAP_CRON_TMP"
|
||
|
echo "* * * * * root /home/owner/minetest/util/chunkymap-cronjob" >> "$MT_CHUNKYMAP_CRON_TMP"
|
||
9 years ago
|
crontab "$MT_CHUNKYMAP_CRON_TMP"
|
||
9 years ago
|
rm "$MT_CHUNKYMAP_CRON_TMP"
|
||
|
|