mirror of
https://gitea.publichub.eu/oscar.krause/fastapi-dls.git
synced 2026-04-08 12:25:48 +03:00
Merge branch 'dev' into ui
# Conflicts: # app/orm.py
This commit is contained in:
@@ -1,2 +1 @@
|
||||
/etc/fastapi-dls/env
|
||||
/etc/systemd/system/fastapi-dls.service
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
WORKING_DIR=/usr/share/fastapi-dls
|
||||
CONFIG_DIR=/etc/fastapi-dls
|
||||
|
||||
if [[ ! -f $CONFIG_DIR/instance.private.pem ]]; then
|
||||
if [ ! -f $CONFIG_DIR/instance.private.pem ]; then
|
||||
echo "> Create dls-instance keypair ..."
|
||||
openssl genrsa -out $CONFIG_DIR/instance.private.pem 2048
|
||||
openssl rsa -in $CONFIG_DIR/instance.private.pem -outform PEM -pubout -out $CONFIG_DIR/instance.public.pem
|
||||
@@ -12,8 +12,8 @@ else
|
||||
fi
|
||||
|
||||
while true; do
|
||||
[[ -f $CONFIG_DIR/webserver.key ]] && default_answer="N" || default_answer="Y"
|
||||
[[ $default_answer == "Y" ]] && V="Y/n" || V="y/N"
|
||||
[ -f $CONFIG_DIR/webserver.key ] && default_answer="N" || default_answer="Y"
|
||||
[ $default_answer == "Y" ] && V="Y/n" || V="y/N"
|
||||
read -p "> Do you wish to create self-signed webserver certificate? [${V}]" yn
|
||||
yn=${yn:-$default_answer} # ${parameter:-word} If parameter is unset or null, the expansion of word is substituted. Otherwise, the value of parameter is substituted.
|
||||
case $yn in
|
||||
@@ -27,7 +27,7 @@ while true; do
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ -f $CONFIG_DIR/webserver.key ]]; then
|
||||
if [ -f $CONFIG_DIR/webserver.key ]; then
|
||||
echo "> Starting service ..."
|
||||
systemctl start fastapi-dls.service
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ -f /etc/systemd/system/fastapi-dls.service ]]; then
|
||||
echo "> Removing service file."
|
||||
rm /etc/systemd/system/fastapi-dls.service
|
||||
fi
|
||||
# is removed automatically
|
||||
#if [ "$1" = purge ] && [ -d /usr/share/fastapi-dls ]; then
|
||||
# echo "> Removing app."
|
||||
# rm -r /usr/share/fastapi-dls
|
||||
#fi
|
||||
|
||||
# todo
|
||||
echo -e "> Done."
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo -e "> Starting uninstallation of 'fastapi-dls'!"
|
||||
|
||||
# todo
|
||||
|
||||
Reference in New Issue
Block a user