Skip to content

Instantly share code, notes, and snippets.

@pg83
Created September 9, 2023 21:16
Show Gist options
  • Save pg83/4bdb11a2ca3602d949db26b4b2a66781 to your computer and use it in GitHub Desktop.
Save pg83/4bdb11a2ca3602d949db26b4b2a66781 to your computer and use it in GitHub Desktop.
# ~/ix - clone of https://github.com/stal-ix/ix
# script will need gnu make, git, python3, wget in PATH
# output will be in ~/some/dir
cd ~/ix
git pull
./ix recache ~/some/dir
@vvzvlad
Copy link

vvzvlad commented Sep 11, 2023

Commands for debian vm (root user):

apt install make git python3 wget git nginx -y
ln -s `which python3` /usr/bin/python
rm /var/www/html/index.nginx-debian.html 
sed -i '/location \/ {/a\    autoindex on;' /etc/nginx/sites-available/default
service nginx reload
git clone https://github.com/stal-ix/ix /root/ix

echo 'log_file="/var/www/html/000000000000000_recache_date_$(date +\%Y\%m\%d\%H\%M\%S).txt"' >> /root/ix_recache.sh
echo 'rm /var/www/html/000000000000000_recache_date_*' >> /root/ix_recache.sh
echo '/usr/bin/git -C /root/ix pull  > "$log_file" 2>&1' >> /root/ix_recache.sh
echo '/root/ix/ix recache /var/www/html/ >> "$log_file" 2>&1' >> /root/ix_recache.sh
echo "0 */4 * * * /bin/sh /root/ix_recache.sh > /dev/null 2>&1" > /etc/cron.d/ix_recache

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment