2022-11-22 12:49:03 +00:00
|
|
|
# Contributor: Stefan Reimer <stefan@zero-downtime.net>
|
|
|
|
# Maintainer: Stefan Reimer <stefan@zero-downtime.net>
|
|
|
|
pkgname=zdt-base
|
|
|
|
pkgver=0.0.1
|
|
|
|
pkgrel=0
|
|
|
|
pkgdesc="ZeroDownTime Alpine additions and customizations"
|
|
|
|
url="https://git.zero-downtime.net/ZeroDownTime/alpine-overlay/src/branch/master/kubezero/zdt-base"
|
|
|
|
arch="noarch"
|
|
|
|
license="AGPL-3.0"
|
2022-11-24 19:01:40 +00:00
|
|
|
depends="logrotate syslog-ng neofetch monit"
|
2022-11-22 12:49:03 +00:00
|
|
|
options="!check"
|
2022-11-24 19:01:40 +00:00
|
|
|
subpackages="$pkgname-openrc $pkgname-aws"
|
|
|
|
install="$pkgname.post-install"
|
2022-11-22 12:49:03 +00:00
|
|
|
|
2022-11-24 19:01:40 +00:00
|
|
|
source="
|
|
|
|
zdt-mount.init
|
|
|
|
zdt-sysctl.conf
|
|
|
|
https://raw.githubusercontent.com/pixelb/ps_mem/v3.14/ps_mem.py
|
|
|
|
syslog-ng.conf
|
|
|
|
syslog-ng.logrotate.conf
|
|
|
|
monitrc
|
|
|
|
monit_alert.sh.aws
|
|
|
|
neofetch.conf
|
|
|
|
zdt-ascii.txt
|
|
|
|
dhclient.conf
|
|
|
|
cloudbender.stop
|
|
|
|
route53.py
|
2022-11-22 12:49:03 +00:00
|
|
|
get_iam_sshkeys.py
|
|
|
|
"
|
|
|
|
|
|
|
|
build() {
|
2022-11-24 19:01:40 +00:00
|
|
|
sed -i -e 's,#!/usr/bin/env python,#!/usr/bin/env python3,' ps_mem.py
|
2022-11-22 12:49:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2022-11-24 19:01:40 +00:00
|
|
|
# dhcp tuning for MTU
|
|
|
|
install -Dm644 "$srcdir"/dhclient.conf "$pkgdir"/etc/dhcp/dhclient.conf
|
|
|
|
|
|
|
|
# various sysctl tunings
|
|
|
|
install -Dm644 "$srcdir"/zdt-sysctl.conf "$pkgdir"/etc/sysctl.d/60-zdt.conf
|
|
|
|
|
|
|
|
# init script to find and mount /var
|
|
|
|
mkdir -p "$pkgdir"/etc/init.d
|
|
|
|
cp zdt-mount.init "$pkgdir"/etc/init.d/zdt-mount
|
|
|
|
|
|
|
|
# syslog-ng configs, json all into messages
|
|
|
|
install -Dm644 "$srcdir"/syslog-ng.conf "$pkgdir"/lib/zdt/syslog-ng.conf
|
|
|
|
install -Dm644 "$srcdir"/syslog-ng.logrotate.conf "$pkgdir"/lib/zdt/syslog-ng.logrotate.conf
|
|
|
|
|
|
|
|
# monit
|
|
|
|
mkdir -p "$pkgdir"/etc/monit.d
|
|
|
|
install -Dm600 "$srcdir"/monitrc "$pkgdir"/etc/monitrc.zdt
|
|
|
|
|
|
|
|
# ps_mem
|
|
|
|
install -Dm755 "$srcdir"/ps_mem.py "$pkgdir"/usr/sbin/ps_mem
|
|
|
|
|
|
|
|
# Neofetch
|
|
|
|
install -Dm644 "$srcdir"/neofetch.conf "$pkgdir"/etc/neofetch.conf
|
|
|
|
install -Dm644 "$srcdir"/zdt-ascii.txt "$pkgdir"/etc/neofetch-logo.txt
|
|
|
|
mkdir -p "$pkgdir"/etc/profile.d
|
|
|
|
echo '[ -n "$SSH_TTY" -a "$SHLVL" -eq 1 ] && neofetch --config /etc/neofetch.conf' > "$pkgdir"/etc/profile.d/motd.sh
|
2022-11-22 12:49:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
aws() {
|
2022-11-24 19:01:40 +00:00
|
|
|
# Basic AWS tools
|
2022-11-22 12:49:03 +00:00
|
|
|
mkdir -p "$subpkgdir"
|
|
|
|
install -Dm755 "$srcdir"/route53.py "$subpkgdir"/usr/sbin/route53.py
|
|
|
|
install -Dm755 "$srcdir"/get_iam_sshkeys.py "$subpkgdir"/usr/sbin/get_iam_sshkeys.py
|
2022-11-24 19:01:40 +00:00
|
|
|
|
|
|
|
# Cloudbender SNS integration
|
|
|
|
install -Dm755 "$srcdir"/cloudbender.stop "$subpkgdir"/etc/local.d/cloudbender.stop
|
|
|
|
install -Dm755 "$srcdir"/monit_alert.sh.aws "$pkgdir"/usr/bin/monit_alert.sh
|
|
|
|
mkdir -p "$subpkgdir"/etc/cloudbender/shutdown.d
|
2022-11-22 12:49:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
sha512sums="
|
2022-11-24 19:01:40 +00:00
|
|
|
16f4020e2e1f93b13b2ce140dea0c31066a55709cb3ae2ece54b9a6db57583e226bc43ac62be18f5a60274b87ae0de8c6bc613597988451853cdf085cae245eb zdt-mount.init
|
|
|
|
b9479835d8667fa99f8b1b140f969f0464a9bb3c60c7d19b57e306cfe82357d453932791e446caded71fddd379161ae8328367f1ee75ae3afc1b85e12294b621 zdt-sysctl.conf
|
|
|
|
76e6a4f309f31bfa07de2d3b1faebe5670722752e18157b69d6e868cbe9e85eda393aed0728b0347a01a810eee442844c78259f86ff71e3136a013f4cbfaaea4 ps_mem.py
|
|
|
|
9d087f2d4403a9c6d4d2f06fbb86519f2b8b134d8eb305facaef07c183815f917fb7bac916d39d504dbab7fdf3321a3f70954dde57e8986cc223371715bb1c54 syslog-ng.conf
|
|
|
|
484bdcf001b71ce5feed26935db437c613c059790b99f3f5a3e788b129f3e22ba096843585309993446a88c0ab5d60fd0fa530ef3cfb6de1fd34ffc828172329 syslog-ng.logrotate.conf
|
|
|
|
b928ba547af080a07dc9063d44cb0f258d0e88e7c5a977e8f1cf1263c23608f0a138b8ffca0cdf5818ee72fccb3ce8433f877811be3107bb9c275dfff988179c monitrc
|
|
|
|
64944727d658ff37e7ff9d22a23869e225e104d9229756ba4fef1fc481c56f782472a1c74f8127636b4a98d4545ae30e7d35822a1f0a0fa31a59ec8eaf8c0396 monit_alert.sh.aws
|
|
|
|
346b0170ada6cc1207ffb7b8ef138a1570a63c7df4d57618aa4b6b6c0d2df2197b0f5b23578ec83c641ee5e724865ac06985222e125809c990467426a0851b72 neofetch.conf
|
|
|
|
532b8e2eb04942ab20bdc36b5dea1c60239fcbfcb85706123f3e05c18d65c938b85e9072d964ae5793177625a8db47b532db1f5bd5ed5ecbb70d5a331666ff54 zdt-ascii.txt
|
|
|
|
c565516121b9e6f9d5f769511eb900546753e67cc4208d1b388fdce44cd28699261a5c3905f9a168d4b2d45ac65ac3a2a6a95335f1bbd76d2f444d5f50ec5c9e dhclient.conf
|
|
|
|
399356eaf09b41cde101aa9164eb492dc824e4bc75d8cd2197d1c2d6120349462dad2791609fb073285b3d3545067611f4608ff14b9d9586a46909269f496c02 cloudbender.stop
|
2022-11-22 12:49:03 +00:00
|
|
|
2d419d5c25a3829e99326b09876f459e48ab66f5756a8ad39b406c0f2829f5a323e8ff512afd8f32b7b07f24c88efa911bee495ce6c4d1925194cb54d3ba57bd route53.py
|
|
|
|
00eaff6c0a506580340b2547c3b1602a54238bac6090a15516839411478a4b4fdc138668b8ad23455445131f3a3e3fda175ed4bb0dd375402641c0e7b69c3218 get_iam_sshkeys.py
|
|
|
|
"
|