Installation Fix and Cleanup

This commit is contained in:
René Linder 2024-03-11 10:10:20 +01:00
parent 077531d4c8
commit 01b51210ee
1 changed files with 5 additions and 13 deletions

View File

@ -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]")