add(any/cs-dev-sshkeys): Init

This commit is contained in:
Markus Pesch 2020-07-09 22:05:46 +02:00
parent 1f0d797ebb
commit 8db53f70bd
Signed by: volker.raschek
GPG Key ID: 852BCC170D81A982
3 changed files with 42 additions and 0 deletions

6
any/cs-dev-sshkeys/.gitignore vendored Normal file
View File

@ -0,0 +1,6 @@
*
!*.sh
!*.install
!.gitignore
!Makefile
!PKGBUILD

View File

@ -0,0 +1,11 @@
# Maintainer: Markus Pesch <markus.pesch@cryptic.systems>
pkgname=cs-dev-sshkeys
pkgver=0.1.0
pkgrel=1
pkgdesc='Register the development ssh keys in /root/.ssh/authorized_keys'
arch=('any')
url=https://git.cryptic.systems/volker.raschek/PKGBUILDs/any/cs-dev-sshkys
license=('Apache 2.0')
depends=('openssh')
install=${pkgname}.install

View File

@ -0,0 +1,25 @@
post_install(){
cat >> root/.ssh/authorized_keys <<EOF
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPOydCxv9/tAV7AdS2HsUIEu547Z5qUJnWYwiO7rI9YL markus@markus-pc
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJUTcUBb+55jRY9TkpLgm8K/8nJfEXyjEX8zljdCCRpi markus@markus-nb
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFo3dc6H1FtVuliB70QY21+7Hsuheqq5ldfgGWg+QLXJ root@ares
EOF
}
# post_update(){
# sed --in-place \
# --regexp-extended '/^ssh-ed25519 .* (markus@markus-pc|markus@markus-nb|root@ares)$/d' \
# root/.ssh/authorized_keys
# cat >> root/.ssh/authorized_keys <<EOF
# ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPOydCxv9/tAV7AdS2HsUIEu547Z5qUJnWYwiO7rI9YL markus@markus-pc
# ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJUTcUBb+55jRY9TkpLgm8K/8nJfEXyjEX8zljdCCRpi markus@markus-nb
# ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFo3dc6H1FtVuliB70QY21+7Hsuheqq5ldfgGWg+QLXJ root@ares
# EOF
# }
post_remove(){
sed --in-place \
--regexp-extended '/^ssh-ed25519 .* (markus@markus-pc|markus@markus-nb|root@ares)$/d' \
root/.ssh/authorized_keys
}