mirror of
https://git.collinwebdesigns.de/oscar.krause/fastapi-dls.git
synced 2025-07-12 13:37:38 +03:00
improved debian installation
This commit is contained in:
parent
764e012fb7
commit
eded286c89
@ -1,6 +1,9 @@
|
||||
# Toggle debug mode
|
||||
#DEBUG=false
|
||||
|
||||
# Cert Path
|
||||
CERT_PATH="/etc/fastapi-dls/cert"
|
||||
|
||||
# Where the client can find the DLS server
|
||||
DLS_URL=127.0.0.1
|
||||
DLS_PORT=443
|
||||
|
@ -3,6 +3,8 @@
|
||||
WORKING_DIR=/usr/share/fastapi-dls
|
||||
CONFIG_DIR=/etc/fastapi-dls
|
||||
|
||||
source $CONFIG_DIR/env
|
||||
|
||||
while true; do
|
||||
[ -f $CONFIG_DIR/webserver.key ] && default_answer="N" || default_answer="Y"
|
||||
[ $default_answer == "Y" ] && V="Y/n" || V="y/N"
|
||||
@ -25,27 +27,32 @@ if [ -f $CONFIG_DIR/webserver.key ]; then
|
||||
|
||||
if [ -x "$(command -v curl)" ]; then
|
||||
echo "> Testing API ..."
|
||||
source $CONFIG_DIR/env
|
||||
curl --insecure -X GET https://$DLS_URL:$DLS_PORT/-/health
|
||||
else
|
||||
echo "> Testing API failed, curl not available. Please test manually!"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "> Create Certificate-Chain folder ..."
|
||||
mkdir -p $CERT_PATH
|
||||
|
||||
echo "> Set permissions ..."
|
||||
chown -R www-data:www-data $CONFIG_DIR
|
||||
chown -R www-data:www-data $WORKING_DIR
|
||||
|
||||
echo "> Done."
|
||||
|
||||
cat <<EOF
|
||||
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
# #
|
||||
# fastapi-dls is now installed. #
|
||||
# #
|
||||
# Service should be up and running. #
|
||||
# Webservice is listen to https://localhost #
|
||||
# #
|
||||
# Configuration is stored in /etc/fastapi-dls/env. #
|
||||
# Service should be up and running (if you choose to auto-generate #
|
||||
# self-signed webserver certificate). #
|
||||
# #
|
||||
# - Webservice is listen to https://localhost # #
|
||||
# - Configuration is stored in /etc/fastapi-dls/env #
|
||||
# #
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user