AptlyOnDemand/srv/aptly_init.sh

27 lines
639 B
Bash
Raw Permalink Normal View History

#!/bin/bash
/usr/sbin/incrond
cat >keyparms <<EOF
%echo Generating a basic OpenPGP key
Key-Type: DSA
Key-Length: 1024
Subkey-Type: ELG-E
Subkey-Length: 1024
Name-Real: $USER_NAME
Name-Comment: dev deb repo
Name-Email: $USER_EMAIL
Expire-Date: 0
Passphrase: $PASSPHRASE
%commit
%echo done
EOF
export PINENTRY_USER_DATA="USE_CURSES=1"
2018-05-15 08:57:00 +02:00
gpg1 --gen-key --batch keyparms
gpg1 --export --armor > /signing-key/aptly.key
aptly repo create --component="main" --distribution="ubuntu" dev
aptly repo add dev /packages
aptly publish repo --batch --passphrase="$PASSPHRASE" dev
aptly serve