servnest-mkosi/mkosi.postinst.chroot

26 lines
614 B
Text
Raw Permalink Normal View History

2022-04-20 00:29:47 +02:00
#!/usr/bin/bash
2023-04-26 02:01:13 +02:00
set -euo pipefail
2022-04-20 00:29:47 +02:00
source /etc/os-release
export OS=$ID
2022-04-20 00:29:47 +02:00
# Generate OpenSSH server key pair
ssh-keygen -f /etc/ssh/ed25519 -t ed25519 -N ""
ssh-keygen -lvf /etc/ssh/ed25519 > /etc/ssh/ed25519.fp
source /install/install.sh
chown $sftpgo: /usr/local/bin/sftpgo
chmod u=rx,g=,o= /usr/local/bin/sftpgo
if [[ $OS = "arch" ]]; then
pacman-key --init
pacman-key --populate
2022-04-20 00:29:47 +02:00
fi
2023-04-20 11:32:57 +02:00
# Enable testing option
sed -i 's/local_only_check = false/local_only_check = true/' /srv/servnest/core/config.ini
2023-09-04 20:12:28 +02:00
2023-11-04 16:21:15 +01:00
chmod u=rwX,g=rX,o=rX / /etc /etc/tor/torrc
2024-04-09 17:09:44 +02:00
chmod -R u=rwX,g=rX,o=rX /etc/php /etc/knot-resolver