servnest-mkosi/mkosi.postinst

31 lines
656 B
Plaintext
Raw Normal View History

2022-04-20 00:29:47 +02:00
#!/usr/bin/bash
2023-09-04 20:12:28 +02:00
if [ "$container" != "mkosi" ]; then
exec mkosi-chroot "$SCRIPT" "$@"
fi
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
chmod u=rwX,g=rX,o=rX / /etc
chmod -R u=rwX,g=rX,o=rX /etc/php