-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.sh
67 lines (46 loc) · 2.3 KB
/
bootstrap.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash
# Run "vagrant provision" to rerun this file via vagrant.
# exit on error
set -e
# "|| true" makes the command always exit "ok"
sudo apt-get update || true
sudo apt-get upgrade --force-yes -y || true
sudo apt-get install -y emacs
sudo apt-get install -y debhelper
sudo apt-get install -y autotools-dev debconf devscripts fakeroot build-essential
sudo apt-get install -y lintian autoconf automake
sudo apt-get install -y libdbd-pg-perl libdbi-perl libperl5.30
sudo apt-get install -y libperl-dev libdate-calc-perl
sudo apt-get install -y postgresql
sudo apt-get install -y less bzip2
# sudo export LANGUAGE="en_US.UTF-8"
# sudo echo 'LANGUAGE="en_US.UTF-8"' >> /etc/default/locale
# sudo echo 'LC_ALL="en_US.UTF-8"' >> /etc/default/locale
# . /etc/default/locale
sudo adduser --home /metno/kvalobs --shell /bin/bash kvalobs --disabled-password --quiet --gecos GECOS || true
sudo -u postgres createuser -sER kvalobs || true
sudo -u kvalobs createdb --owner kvalobs kvalobs || true
sudo -u kvalobs createdb --owner kvalobs METNO || true
sudo -u kvalobs createdb --owner kvalobs PROJ || true
sudo -u kvalobs createdb --owner kvalobs SVV || true
sudo -u kvalobs mkdir -p /metno/kvalobs/src
#sudo -u kvalobs psql -f /metno/kvalobs/src/kvalobs_database/kvalobs_schema.sql || true
#sudo -u kvalobs psql -d METNO -f /metno/kvalobs/src/instance_tables.sql || true
#sudo -u kvalobs psql -d PROJ -f /metno/kvalobs/src/instance_tables.sql || true
#sudo -u kvalobs psql -d SVV -f /metno/kvalobs/src/instance_tables.sql || true
#sudo apt-get install --force-yes -y libaio1
sudo mkdir -pv /usr/share/kvalobs/
sudo chgrp kvalobs /usr/share/kvalobs/
sudo chmod g+ws /usr/share/kvalobs/
sudo mkdir -pv /usr/share/kvalobs/metadata
sudo chown -R kvalobs:kvalobs /usr/share/kvalobs/metadata
sudo mkdir -pv /var/log/kvalobs/
sudo chgrp kvalobs /var/log/kvalobs/
sudo chmod g+ws /var/log/kvalobs/
# sudo -u kvalobs cp -puv /metno/kvalobs/kvmetadata_auto/station_param_auto/station_param_QC1-1.out /metno/kvalobs/kvmetadata/station_param/station_param_auto
# HUSK /etc/resolv.conf
#root@vagrant-ubuntu-trusty-64:~# cat /etc/resolv.conf
## Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
## DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
#nameserver 10.0.2.2
#search met.no oslo.dnmi.no