Browse Source

make updater update php and images if using default website directory

or you change updater to use your website directory
master
poikilos 9 years ago
committed by Jacob Gustafson
parent
commit
42e2df1ef4
  1. 9
      README.md
  2. 11
      update-chunkymap-on-ubuntu-from-web.sh

9
README.md

@ -37,6 +37,15 @@ This program comes without any warranty, to the extent permitted by applicable l
(otherwise first edit the script to fit your crontab then) (otherwise first edit the script to fit your crontab then)
(if you are not using /var/www/html/minetest/chunkymapdata, edit chunkymap-cronjob script to use the correct folder, then) (if you are not using /var/www/html/minetest/chunkymapdata, edit chunkymap-cronjob script to use the correct folder, then)
`chmod +x set-minutely-crontab-job.sh && ./set-minutely-crontab-job.sh` `chmod +x set-minutely-crontab-job.sh && ./set-minutely-crontab-job.sh`
* IF you are using Linux
* Either copy your code to index-example.php and use it, or just rename it to map.php (or anything you want) then link to it.
# The commands below will work if you are using the web installer, or have done mv minetest-chunkymap-master "$HOME/Downloads/minetest-chunkymap" (and if you are using /var/www/html/minetest -- otherwise change that)
MT_MY_WEBSITE_PATH=/var/www/html/minetest
sudo cp -f "$HOME/Downloads/minetest-chunkymap/web/chunkymap.php" "$MT_MY_WEBSITE_PATH/chunkymap.php"
sudo cp --no-clobber "$HOME/Downloads/minetest-chunkymap/web/index_example.php" "$MT_MY_WEBSITE_PATH/viewchunkymap.php"
sudo cp -R --no-clobber "$HOME/Downloads/minetest-chunkymap/web/images/*" "$MT_MY_WEBSITE_PATH/images/"
#--no-clobber: do not overwrite existing
# after you do this, the update script will do it for you if you are using /var/www/html/minetest, otherwise edit the update script before using it to get these things updated
* IF you are using Windows * IF you are using Windows
* put these files anywhere * put these files anywhere
* manually schedule a task in Task Scheduler to run C:\Python27\python chunkymap-regen.py every minute * manually schedule a task in Task Scheduler to run C:\Python27\python chunkymap-regen.py every minute

11
update-chunkymap-on-ubuntu-from-web.sh

@ -14,3 +14,14 @@ sh "$CHUNKYMAP_INSTALLER_DIR/update-chunkymap-installer-only.sh"
#./install-chunkymap-on-ubuntu.sh #./install-chunkymap-on-ubuntu.sh
chmod +x "$CHUNKYMAP_INSTALLER_DIR/install-chunkymap-on-ubuntu.sh" chmod +x "$CHUNKYMAP_INSTALLER_DIR/install-chunkymap-on-ubuntu.sh"
sh "$CHUNKYMAP_INSTALLER_DIR/install-chunkymap-on-ubuntu.sh" sh "$CHUNKYMAP_INSTALLER_DIR/install-chunkymap-on-ubuntu.sh"
MT_MY_WEBSITE_PATH=/var/www/html/minetest
if [ -f "$HOME/Downloads/minetest-chunkymap/web/chunkymap.php" ]; then
if [ -f "$MT_MY_WEBSITE_PATH/chunkymap.php" ]; then
sudo cp -f "$HOME/Downloads/minetest-chunkymap/web/chunkymap.php" "$MT_MY_WEBSITE_PATH/chunkymap.php"
sudo cp --no-clobber "$HOME/Downloads/minetest-chunkymap/web/index_example.php" "$MT_MY_WEBSITE_PATH/viewchunkymap.php"
sudo cp -R --no-clobber "$HOME/Downloads/minetest-chunkymap/web/images/*" "$MT_MY_WEBSITE_PATH/images/"
#--no-clobber: do not overwrite existing
fi
fi
Loading…
Cancel
Save