diff --git a/configs/debian/bookworm_server.json b/configs/debian/bookworm_server.json index 299c085..9caf962 100644 --- a/configs/debian/bookworm_server.json +++ b/configs/debian/bookworm_server.json @@ -6,7 +6,7 @@ "repositories": [], "replace_repositories": "False", "keyrings": [], - "packages": "nginx grub-pc linux-image-amd64 docker.io make curl", + "packages": "nginx grub-pc linux-image-amd64 docker.io make curl openssl nano", "scripts": [ "configs/scripts/install.sh", "configs/scripts/server.sh" diff --git a/configs/scripts/server.sh b/configs/scripts/server.sh index 8ea3e09..5dc0c1f 100755 --- a/configs/scripts/server.sh +++ b/configs/scripts/server.sh @@ -24,6 +24,14 @@ done rm /mnt/etc/nginx/sites-enabled/default tar -xzf deployment.tar.gz -C '/mnt/root' -chroot /mnt /bin/bash -c "cd /root/jet-search/ && make install" +chroot /mnt /bin/bash -c "cd root && openssl genrsa -out ca.key 2048" +chmod 400 /mnt/root/ca.key +mkdir -p /mnt/etc/ssl/certs/ +mkdir -p /mnt/etc/ssl/private/ +chroot /mnt /bin/bash -c "openssl req -x509 -new -nodes -key ca.key -sha256 -days 1024 -out /mnt/etc/ssl/certs/ca.crt" +chroot /mnt /bin/bash -c "chown -R www-data:www-data /etc/ssl/private/" +chroot /mnt /bin/bash -c "chown -R www-data:www-data /etc/ssl/certs/" +chmod 600 -R /mnt/etc/ssl/private/ +chmod 644 -R /mnt/etc/ssl/certs/jetsearch.com.crt read a diff --git a/configs/ubuntu/noble_server.json b/configs/ubuntu/noble_server.json index ca92530..cc5b36e 100644 --- a/configs/ubuntu/noble_server.json +++ b/configs/ubuntu/noble_server.json @@ -6,11 +6,13 @@ "repositories": [], "replace_repositories": "False", "keyrings": [], - "packages": "nginx grub-pc linux-image-generic", + "packages": "nginx grub-pc linux-image-generic docker.io make curl openssl nano", "scripts": [ "configs/scripts/install.sh", "configs/scripts/server.sh" ], "package_manager": "apt", - "extra_files": [] + "extra_files": [ + "downloads/deployment.tar.gz" + ] } \ No newline at end of file