Last active
August 29, 2015 14:05
-
-
Save samnazarko/2d2b93e8150b5ff694d9 to your computer and use it in GitHub Desktop.
Sets up Apache2 to serve webCDN on a Debian or Ubuntu system.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
apt-get update | |
apt-get -y install rsync apache2 | |
echo "rsync -auP --delete rsync://rsync.samnazarko.co.uk/cdn /var/www" > /root/sync.sh | |
chmod +x /root/sync.sh | |
echo "0 * * * * /root/sync.sh | |
" > /var/spool/cron/crontabs/root | |
echo Performing initial sync | |
/root/sync.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Added a new line to the crontab as cronjobs should end with an empty line.