summaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
authorKarel Kočí <karel.koci@nic.cz>2018-09-20 11:28:08 +0200
committerKarel Kočí <karel.koci@nic.cz>2018-09-20 12:11:23 +0200
commiteb2f5931c7a80710c974200395a4501e38b409a1 (patch)
tree00f719f010549e3afe55229d316deda6f2fa9a9b /files
parent577a64a6bc8bb69c3337ad34bcf5f7b33cf50d6b (diff)
downloadlaminar-cnf-eb2f5931c7a80710c974200395a4501e38b409a1.tar.gz
laminar-cnf-eb2f5931c7a80710c974200395a4501e38b409a1.tar.bz2
laminar-cnf-eb2f5931c7a80710c974200395a4501e38b409a1.zip
alpine-amd64: add setup script
Diffstat (limited to 'files')
-rwxr-xr-xfiles/alpine/amd64.sh3
-rwxr-xr-xfiles/alpine/setup.sh25
-rw-r--r--files/alpine/setup.sh.gpgbin0 -> 1283 bytes
3 files changed, 27 insertions, 1 deletions
diff --git a/files/alpine/amd64.sh b/files/alpine/amd64.sh
index e1d0727..e80cc5c 100755
--- a/files/alpine/amd64.sh
+++ b/files/alpine/amd64.sh
@@ -1,7 +1,7 @@
#!/bin/sh
. utils
-# TODO mount global alpine repository
+# TODO mount global distfiles cache
# TODO get latest uri from latest-releases.yml file
if [ ! -d "$ROOT" ]; then
@@ -47,3 +47,4 @@ ssh upload /bin/sh -e <<EOF
rm -rf /var/www/repo/alpine
mv deploy-alpine /var/www/repo/alpine
EOF
+scp "$FILES"/alpine/setup.sh{,.gpg} upload:/var/www/repo/alpine/
diff --git a/files/alpine/setup.sh b/files/alpine/setup.sh
new file mode 100755
index 0000000..f0dc863
--- /dev/null
+++ b/files/alpine/setup.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+set -e
+[ -f "/etc/alpine-release" ] || {
+ echo "This is not alpine distribution!" >&2
+ exit 1
+}
+[ "$(id -u)" = "0" ] || {
+ echo "Please run this script as root!" >&2
+ exit 1
+}
+
+# Deploy key
+cat >/etc/apk/keys/cynerd@email.cz-5b8aeb6d.rsa.pub <<EOF
+-----BEGIN PUBLIC KEY-----
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxqyrzNQiXMcbINl28vIu
+txXABQjOd4xSQB1/wMgblmSfnutSdsSDU3iVIBR/e5QupxAA3u0ddwcNn9fdj9GL
+/WCIls+Yt3eWkiD6R10nkWANLQvYJQe369fCi/ViKBperdbYMnZAK5JwLJgsQKrw
+30gQVxgCkXHUh/frGFenQOLmn9tJqu2cPLx5neyfh3Hys2CMRomAJd0GBosg3RKt
+97Kp+VdtWTNqZobykQ7VTssPsbHrOXnHi60zCPP4ocMfvq+7F2mtnpBwRd1mz8ke
+L2C6/kvFJ2qFVAp5LDq2znZ4X+FT3Z9VYoe4K4I0sgKyzHyvksTgl24f4rfJ4DA3
+EwIDAQAB
+-----END PUBLIC KEY-----
+EOF
+# Add repository
+echo "https://cynerd.cz/repo/alpine" >> /etc/apk/repositories
diff --git a/files/alpine/setup.sh.gpg b/files/alpine/setup.sh.gpg
new file mode 100644
index 0000000..aeec2a6
--- /dev/null
+++ b/files/alpine/setup.sh.gpg
Binary files differ