* Default app works * static tech = default tech * cancel fixed
This commit is contained in:
parent
cd028c9e32
commit
631ad0c859
@ -48,7 +48,9 @@ function setTech() {
|
||||
echo "NOTE: /srv/app doesn't exists, creating it from $tech example application"
|
||||
mkdir -p /srv/app
|
||||
cp -a /opt/examples/$name/* /srv/app/
|
||||
test $name -eq "default" || mv /srv/app/supervisor.conf /srv/conf/supervisor.d/$name.conf
|
||||
if [ -e /srv/app/supervisor.conf ]; then
|
||||
mv /srv/app/supervisor.conf /srv/conf/supervisor.d/$name.conf
|
||||
fi
|
||||
else
|
||||
echo "IMPORTANT: /srv/app found so no configuration or files are copied, make sure the application is ok after this process"
|
||||
fi
|
||||
@ -98,13 +100,14 @@ function setTech() {
|
||||
# Same thing we do for nginx but if the file exist it's not rewritten.
|
||||
if [ ! -e /srv/conf/nginx.d/app.conf ]; then
|
||||
mkdir -p /srv/conf/nginx.d
|
||||
if [ "$name" = "php" ]; then
|
||||
cp /opt/examples/php/nginx.conf /srv/conf/nginx.d/app.conf
|
||||
if [ -e /opt/examples/$tech/nginx.conf ]; then
|
||||
cp /opt/examples/$tech/nginx.conf /srv/conf/nginx.d/app.conf
|
||||
rm /srv/app/nginx.conf
|
||||
else
|
||||
cp /opt/examples/nginx/nginx.conf /srv/conf/nginx.d/app.conf
|
||||
fi
|
||||
|
||||
echo ".. app configuration for nginx not found, adding it - please check /srv/conf/nginx.d/app.conf and make sure it fits your code"
|
||||
|
||||
fi
|
||||
|
||||
# We load new configuration into supervisor and it's automatically started or restarted if needed
|
||||
@ -208,6 +211,9 @@ function quickTech() {
|
||||
"default")
|
||||
setTech $TECH
|
||||
;;
|
||||
"static")
|
||||
setTech default
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
@ -234,6 +240,10 @@ while /bin/true; do
|
||||
menuitem=$MENUITEM
|
||||
fi
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
case $menuitem in
|
||||
# Activation of one of the available tech
|
||||
# Only one tech can be enabled same time but it's possible to use any of them from /opt/techs
|
||||
|
Loading…
Reference in New Issue
Block a user