From 9b49564c2900efc324a149f83f1b4dcb98706f64 Mon Sep 17 00:00:00 2001 From: Bread <103989916+breadtf@users.noreply.github.com> Date: Sat, 27 Apr 2024 09:15:30 +0100 Subject: [PATCH] Fix overwriting index.html --- httpd/DEBIAN/postinst | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/httpd/DEBIAN/postinst b/httpd/DEBIAN/postinst index 74f54f3..a2bf7de 100755 --- a/httpd/DEBIAN/postinst +++ b/httpd/DEBIAN/postinst @@ -1,18 +1,19 @@ #!/bin/bash mkdir -p /var/www/html -touch /var/www/html/index.html -echo "
-
Server Manager" >> /var/www/html/index.html - +if [ ! -f /var/www/html/index.html ]; then + touch /var/www/html/index.html + echo "+
Server Manager" >> /var/www/html/index.html +fi sudo systemctl enable --now httpd