add(any/cs-dev-sshkeys): Init
This commit is contained in:
parent
1f0d797ebb
commit
8db53f70bd
6
any/cs-dev-sshkeys/.gitignore
vendored
Normal file
6
any/cs-dev-sshkeys/.gitignore
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
*
|
||||||
|
!*.sh
|
||||||
|
!*.install
|
||||||
|
!.gitignore
|
||||||
|
!Makefile
|
||||||
|
!PKGBUILD
|
11
any/cs-dev-sshkeys/PKGBUILD
Normal file
11
any/cs-dev-sshkeys/PKGBUILD
Normal 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
|
25
any/cs-dev-sshkeys/cs-dev-sshkeys.install
Normal file
25
any/cs-dev-sshkeys/cs-dev-sshkeys.install
Normal 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
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user