From 06941ae7edd594a964d02655d1b2dc610e65838d Mon Sep 17 00:00:00 2001 From: Benjamin Bohard Date: Fri, 4 May 2018 09:24:18 +0200 Subject: [PATCH] =?UTF-8?q?Ne=20plus=20fournir=20l=E2=80=99identit=C3=A9?= =?UTF-8?q?=20et=20le=20mot=20de=20passe=20de=20la=20cl=C3=A9=20en=20dur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aptly.boot | 5 ++++- aptly.sh | 10 ++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/aptly.boot b/aptly.boot index 0aa4930..14b6eba 100755 --- a/aptly.boot +++ b/aptly.boot @@ -32,7 +32,10 @@ fi container_id=$(docker run -d -v ${PACKAGES_FOLDER}:/packages -v ${GPG_FOLDER}:/signing-key -p $PORT:8080 cadoles/aptly:dev) -if [ $(docker ps -q --no-trunc | grep -q $container_id) ] +docker ps -q --no-trunc | grep -q ${container_id} +res=$? + +if [ "${res}" -eq 0 ] then echo "container with id $container_id started" diff --git a/aptly.sh b/aptly.sh index 180e4a0..7a1a357 100755 --- a/aptly.sh +++ b/aptly.sh @@ -1,16 +1,18 @@ #!/bin/bash +passphrase="$(pwgen -1 -n 20)" + cat >keyparms < /signing-key/dev.pubkey aptly repo create --component="main" --distribution="ubuntu" dev aptly repo add dev /packages -aptly publish repo --batch --passphrase="abc" dev +aptly publish repo --batch --passphrase="${passphrase}" dev aptly serve