Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 62 lines (47 sloc) 1.53 kb
5ef3005 @solidsnack Move setting of diagnostic/error flags into script.
solidsnack authored
1 #!/bin/bash
2 set -o errexit -o nounset -o xtrace
17df6ad @snoyberg Initial setup-keter.sh
authored
3
9e1b46a @snoyberg Updated setup-keter.sh
authored
4 # Quick start:
5 # wget -O - https://raw.github.com/snoyberg/keter/master/setup-keter.sh | bash -ex
6
7 sudo apt-get update
8 sudo apt-get install postgresql haskell-platform -y
17df6ad @snoyberg Initial setup-keter.sh
authored
9
10 cabal update
03ad6b5 @snoyberg force-reinstalls
authored
11 cabal install keter --force-reinstalls
17df6ad @snoyberg Initial setup-keter.sh
authored
12 sudo mkdir -p /opt/keter/bin
13 sudo cp ~/.cabal/bin/keter /opt/keter/bin
14
15 sudo mkdir -p /opt/keter/etc
16 cat > /tmp/keter-config.yaml <<EOF
3c47a20 @snoyberg Updated config file
authored
17 # Directory containing incoming folder, where to store logs, etc. Relative to
18 # the config file directory.
17df6ad @snoyberg Initial setup-keter.sh
authored
19 root: ..
3c47a20 @snoyberg Updated config file
authored
20
21 # Keter can listen on multiple ports for incoming connections. These ports can
22 # have HTTPS either enabled or disabled.
23 listeners:
24 # HTTP
25 - host: "*4" # Listen on all IPv4 hosts
26 #port: 80 # Could be used to modify port
27 # HTTPS
28 - host: "*4"
29 #port: 443
30 key: key.pem
31 certificate: certificate.pem
32
33 # User to run applications as
34
35 # setuid: ubuntu
36
37 # Get the user's IP address from x-forwarded-for. Useful when sitting behind a
38 # load balancer like Amazon ELB.
39
40 # ip-from-header: true
17df6ad @snoyberg Initial setup-keter.sh
authored
41 EOF
42 sudo chown root:root /tmp/keter-config.yaml
43 sudo mv /tmp/keter-config.yaml /opt/keter/etc
44
45 cat > /tmp/keter.conf <<EOF
46 # /etc/init/keter.conf
47 start on (net-device-up and local-filesystems and runlevel [2345])
48 stop on runlevel [016]
49 respawn
50
51 console none
52
53 exec /opt/keter/bin/keter /opt/keter/etc/keter-config.yaml
54 EOF
55 sudo chown root:root /tmp/keter.conf
56 sudo mv /tmp/keter.conf /etc/init
57
58 sudo start keter
59
60 sudo mkdir -p /opt/keter/incoming
17843e9 @solidsnack Quote variable reference (you never know :).
solidsnack authored
61 sudo chown "$USER" /opt/keter/incoming
Something went wrong with that request. Please try again.