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