From 01b51210ee73e7d895013d707ec8fe7ef69a5d9f Mon Sep 17 00:00:00 2001 From: Ground0 Date: Mon, 11 Mar 2024 10:10:20 +0100 Subject: [PATCH] Installation Fix and Cleanup --- installation.pb | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/installation.pb b/installation.pb index 25f60ae..4018ba9 100644 --- a/installation.pb +++ b/installation.pb @@ -54,7 +54,7 @@ CopyFile("cfg/hosts/default.xml", "/etc/lhttpd/hosts/default.xml") PrintN("Copy application") CopyFile("lhttpd", "/opt/lhttpd/lhttpd") PrintN("chown and chmod for ssl...") -If CreateFile(0, "/tmp/install.sh") +If CreateFile(0, "/tmp/lhttpd_install.sh") WriteStringN(0, "#!/bin/bash") WriteStringN(0, "echo 'started'") WriteStringN(0, "chown -R lhttpd:lhttpd /etc/lhttpd") @@ -71,23 +71,15 @@ If CreateFile(0, "/tmp/install.sh") WriteStringN(0, "echo 'finished'") CloseFile(0) Else - PrintN("Error : Unable To create script") + PrintN("Error : Unable To create script at /tmp/lhttpd_install.sh") End EndIf -RunProgram("chmod", "777 /tmp/install.sh", "", #PB_Program_Wait) +RunProgram("chmod", "777 /tmp/lhttpd_install.sh", "", #PB_Program_Wait) Delay(1000) -RunProgram("/tmp/install.sh", "", "", #PB_Program_Wait) +RunProgram("/tmp/lhttpd_install.sh", "", "", #PB_Program_Wait) -DeleteFile("/tmp/install.sh") +DeleteFile("/tmp/lhttpd_install.sh") -; RunProgram("chown", "-R lhttpd:lhttpd /etc/lhttpd","", #PB_Program_Wait) -; RunProgram("chown", "-R lhttpd:lhttpd /var/lib/lhttpd","", #PB_Program_Wait) -; RunProgram("chown", "-R lhttpd:lhttpd /var/log/lhttpd","", #PB_Program_Wait) -; RunProgram("chown", "-R lhttpd:lhttpd /opt/lhttpd","", #PB_Program_Wait) -; RunProgram("chmod", "-R 744 /etc/lhttpd","",#PB_Program_Wait) -; RunProgram("chmod", "-R 744 /etc/lhttpd/hosts","",#PB_Program_Wait) -; RunProgram("chmod", "-R 700 /etc/lhttpd/ssl","",#PB_Program_Wait) -; RunProgram("chown", "-R 755 /opt/lhttpd","",#PB_Program_Wait) PrintN("Create service file: /usr/lib/systemd/system/lhttpd.service") If CreateFile(0, "/usr/lib/systemd/system/lhttpd.service") WriteStringN(0,"[Unit]")