1
0
Fork 0
mirror of https://gitlab.com/niansa/simpsh-httpd.git synced 2025-03-06 20:53:36 +01:00
simpsh-httpd/htmlfilelist.sh
2018-07-03 16:15:48 +00:00

22 lines
391 B
Bash

#! /bin/bash
status="$URL"
# Static HTML
echo '<html>
<head>
<title>'"${HTMLTITLE}"'</title>
</head>
<body>
<p>'"$status"'</p>
<h2>Directory list:</h2><br />
<a href="../">..</a><br />' >> $HTMLFILE
# Creation of the filelist
for i in $( ls "${FILE}" ); do
echo ' <a href="./'"${i}"'">'"${i}"'</a><br />' >> $HTMLFILE
done
# Static HTML
echo ' </body>
</html>' >> $HTMLFILE