update http.server to point at webdir folder

This commit is contained in:
Thomas Cole 2021-07-13 08:41:49 -04:00
parent fe3b1ce399
commit abe594bc38

View File

@ -10,11 +10,11 @@ LOCALIP=$(hostname -I)
. .passwd.cfg
#copy the pre-preseed file and update the passwords from the .passwd.cfg file
cp input.cfg preseed.cfg
sed -i "s/@ROOTHASH/$roothash/g" preseed.cfg
sed -i "s/@USERHASH/$userhash/g" preseed.cfg
cp input.cfg webdir/preseed.cfg
sed -i "s/@ROOTHASH/$roothash/g" webdir/preseed.cfg
sed -i "s/@USERHASH/$userhash/g" webdir/preseed.cfg
echo "Starting server. Press CTRL+C to stop."
echo -e "Local IP address: \e[32m$LOCALIP\e[0m"
python3 -m http.server 80
python3 -m http.server 80 --directory ./webdir