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
2018-09-24 13:33:52 +00:00

28 lines
No EOL
467 B
Bash

#! /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 is 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 files
rm $OUTFILE