summaryrefslogtreecommitdiff
path: root/apt
diff options
context:
space:
mode:
authorLeif Johansson <leifj@sunet.se>2013-09-02 16:01:50 +0200
committerLeif Johansson <leifj@sunet.se>2013-09-02 16:01:50 +0200
commit7515782eb503152dfc3e84fee1260fb10d560df9 (patch)
treece0087dc774a156c6a74f11d3af92ef5686b4972 /apt
import
Diffstat (limited to 'apt')
-rwxr-xr-xapt/bootstrap-cosmos.sh35
-rw-r--r--apt/cosmos_1.2-2_all.debbin0 -> 11724 bytes
2 files changed, 35 insertions, 0 deletions
diff --git a/apt/bootstrap-cosmos.sh b/apt/bootstrap-cosmos.sh
new file mode 100755
index 0000000..1e8b751
--- /dev/null
+++ b/apt/bootstrap-cosmos.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+set -e
+
+cmd_hostname="$1"
+if test -z "$cmd_hostname"; then
+ echo "Usage: $0 HOSTNAME REPO"
+ exit 1
+fi
+
+cmd_repo="$2"
+if test -z "$cmd_repo"; then
+ echo "Usage $0 HOSTNAME REPO"
+ exit 2
+fi
+
+set -x
+
+apt-get -y install rsync git-core
+dpkg -i cosmos_1.2-2_all.deb
+
+if ! test -d /var/cache/cosmos/repo; then
+ cosmos clone "$cmd_repo"
+fi
+
+hostname $cmd_hostname
+
+perl -pi -e "s,#COSMOS_REPO_MODELS=.*,COSMOS_REPO_MODELS=\"\\\$COSMOS_REPO/global/:\\\$COSMOS_REPO/$cmd_hostname/\"," /etc/cosmos/cosmos.conf
+perl -pi -e 's,#COSMOS_UPDATE_VERIFY_GIT_TAG_PATTERN=.*,COSMOS_UPDATE_VERIFY_GIT_TAG_PATTERN="eduid-cosmos*",' /etc/cosmos/cosmos.conf
+
+COSMOS_BASE=/var/cache/cosmos /var/cache/cosmos/repo/global/pre-tasks.d/010cosmos-trust
+
+(date; nohup cosmos -v update && nohup cosmos -v apply; date) > /var/log/cosmos.log 2>&1
+
+exit 0
diff --git a/apt/cosmos_1.2-2_all.deb b/apt/cosmos_1.2-2_all.deb
new file mode 100644
index 0000000..9fe4434
--- /dev/null
+++ b/apt/cosmos_1.2-2_all.deb
Binary files differ