YaK:: Configuring iotanu.yak.net [Changes]   [Calendar]   [Search]   [Index]   [PhotoTags]   
[mega_changes]
[photos]

Configuring iotanu.yak.net

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

root@iotanu:~# cat -n start-hugo.sh
     1        exec </dev/null >>/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 </dev/null >>/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

# crontab -e

# 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

# sh pull-site.sh

# sh start-hugo.sh

(unless otherwise marked) Copyright 2002-2014 YakPeople. All rights reserved.
(last modified 2015-03-28)       [Login]
(No back references.)