1
0
Fork 0
mirror of https://gitlab.com/niansa/simpsh-httpd.git synced 2025-03-06 20:53:36 +01:00
simpsh-httpd/main.sh
2020-08-02 22:24:46 +02:00

28 lines
No EOL
467 B
Bash
Executable file

#! /bin/bash
# Variable initalisation
. ./init.sh
# Read the config file
. ./config.sh
# Read the HTTP-request
. ./readrequest.sh
# Some URL checks and modifications
. ./urlcheck.sh
# Skip following step, if the document was already created successfully
if [ "$DONE" != "true" ]; then
# Write finished file
. ./sendfile.sh
fi
# Convert Unix to Dos
unix2dos $OUTFILE &> /dev/null
# Print finished document
cat $OUTFILE
# Remove the temporary file
rm $OUTFILE