Skip to content

Commit

Permalink
Updated httpconf to support php uploader
Browse files Browse the repository at this point in the history
  • Loading branch information
pocopico committed Jun 6, 2023
1 parent 26e6764 commit 6a91bbf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions html/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1979,6 +1979,8 @@ function patchramdisk() {

wecho "Copying file to ${tcrppart}"

mount /dev/${loaderdisk}1 && [ -f /mnt/${loaderdisk}1/custom.gz ] && wecho "Found old custom.gz, moving it to old" && mv -f /mnt/${tcrpdisk}1/custom.gz /mnt/${tcrpdisk}1/custom.gz.old && umount /dev/${loaderdisk}1

status "setstatus" "copyfilestodisk" "false" "Copying all files to disk"
status "setstatus" "copyfilestodisk" "false" "Copying $HOMEPATH/custom.gz to /mnt/${tcrppart}/" && cp -f $HOMEPATH/custom.gz /mnt/${tcrppart}/ && status "setstatus" "copyfilestodisk" "false" "Copied $HOMEPATH/custom.gz to /mnt/${tcrppart}/"
#status "setstatus" "copyfilestodisk" "false" "Copying $HOMEPATH/custom.gz to /mnt/${loaderdisk}1/ " && cp -f $HOMEPATH/custom.gz /mnt/${loaderdisk}1/ && status "setstatus" "copyfilestodisk" "false" "Copied $HOMEPATH/custom.gz to /mnt/${loaderdisk}1/"
Expand Down
9 changes: 5 additions & 4 deletions rploader.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ function history() {
0.9.4.5 Changed the way the system is updated to use the new build method
0.9.4.6 Updated configuration files, minor fixes, changed from 64551 to 64561
0.9.4.7 Added missing configs, Added support for RS3413xs+
0.9.4.8 Updated httpconf to support php uploader
--------------------------------------------------------------------------------------
EOF

Expand Down Expand Up @@ -143,9 +144,9 @@ function setnetwork() {
}

function httpconf() {
tce-load -iw php-8.0-cli 2>&1 >/dev/null
tce-load -iw php-8.0-cgi 2>&1 >/dev/null
tce-load -iw lighttpd 2>&1 >/dev/null
cp ../include/php.ini /usr/local/etc/php/
sudo cp /home/tc/include/php.ini /usr/local/etc/php/

cat >/home/tc/lighttpd.conf <<EOF
server.document-root = "/home/tc/html"
Expand All @@ -156,11 +157,11 @@ server.username = "tc"
server.groupname = "staff"
server.port = 80
alias.url = ( "/rploader/" => "/home/tc/html/" )
cgi.assign = ( ".sh" => "/usr/local/bin/bash", ".php" => "/usr/local/bin/php" )
cgi.assign = ( ".sh" => "/usr/local/bin/bash", ".php" => "/usr/local/bin/php-cgi" )
index-file.names = ( "index.sh", "index.html","index.htm" )
EOF

ps -ef | grep -i light | grep -v grep | awk '{print $1}' | xargs kill -9
sudo lighttpd -f /home/tc/lighttpd.conf

[ $(sudo netstat -an 2>/dev/null | grep LISTEN | grep ":80" 2>/dev/null | wc -l) -eq 1 ] && echo "Server started succesfully"
Expand Down

0 comments on commit 6a91bbf

Please sign in to comment.