title Configuring iotanu.yak.net user strick ip 128.61.105.76 vol 1 lock ******** /list( * The source for the site is kept in a github repository here: https://github.com/iota-nu/iota-nu-hugo * You need a compiled binary of hugo: http://gohugo.io/ * You need golang to compile hugo. http://golang.org/ * The content was scraped from http://iotanu.org/ and the theme built by strick * The demo site is running at http://iotanu.yak.net/ /list) Buy $5/mo droplet: 45.55.151.84 Active 512MB Ram 20GB SSD Disk New York 3 Ubuntu 14.04 x64. Configure my SSH public key on it. Log in as root. # apt-get update; apt-get upgrade # apt-get install git # git clone 'https://github.com/iota-nu/iota-nu-hugo' # scp /usr/local/bin/hugo root@iotanu.yak.net:/usr/local/bin/ # hugo version / Hugo Static Site Generator v0.14-DEV-0921761 BuildDate: 2015-03-24T23:07:12-07:00 /pre( root@iotanu:~# cat -n start-hugo.sh 1 exec >/tmp/hugo.log 2>&1 2 set -x 3 date 4 cd /root/iota-nu-hugo 5 killall hugo 6 sleep 1 7 nohup /usr/local/bin/hugo server -v -p80 --buildDrafts -w --theme=iota-newt -b "http://iotanu.yak.net/" & root@iotanu:~# root@iotanu:~# cat -n pull-site.sh 1 exec >/tmp/pull.log 2>&1 2 set -x 3 date 4 cd /root/iota-nu-hugo/ 5 git pull root@iotanu:~# root@iotanu:~# cat -n /etc/rc.local 1 #!/bin/sh -e 2 # 3 # rc.local 4 # 5 # This script is executed at the end of each multiuser runlevel. 6 # Make sure that the script will "exit 0" on success or any other 7 # value on error. 8 # 9 # In order to enable or disable this script just change the execution 10 # bits. 11 # 12 # By default this script does nothing. 13 14 ( sh /root/start-hugo.sh >>/tmp/hugo.log 2>&1 ) & 15 16 exit 0 /pre) # crontab -e /pre( # m h dom mon dow command 4 1,9,17 * * * apt-get -q -y update >>/tmp/apt.log 2>&1 9 1,9,17 * * * apt-get -q -y upgrade >>/tmp/apt.log 2>&1 15 * * * * sh /root/pull-site.sh 0 0 * * * sh /root/start-hugo.sh /pre) # sh pull-site.sh # sh start-