mirror of
https://github.com/YunoHost-Apps/pgadmin_ynh.git
synced 2024-09-03 19:56:38 +02:00
fix uwsgi
This commit is contained in:
parent
0ac8cbb574
commit
295864a24d
2 changed files with 7 additions and 7 deletions
|
@ -43,7 +43,7 @@ EOF
|
||||||
#
|
#
|
||||||
# __APP__ by $app
|
# __APP__ by $app
|
||||||
# __PATH__ by $path_url
|
# __PATH__ by $path_url
|
||||||
# __FINALPATH__ by $final_path
|
# __FINALPATH__ by $install_dir
|
||||||
#
|
#
|
||||||
# And dynamic variables (from the last example) :
|
# And dynamic variables (from the last example) :
|
||||||
# __PATH_2__ by $path_2
|
# __PATH_2__ by $path_2
|
||||||
|
@ -51,7 +51,7 @@ EOF
|
||||||
#
|
#
|
||||||
# To be able to customise the settings of the systemd unit you can override the rules with the file "conf/uwsgi-app@override.service".
|
# To be able to customise the settings of the systemd unit you can override the rules with the file "conf/uwsgi-app@override.service".
|
||||||
# This file will be automatically placed on the good place
|
# This file will be automatically placed on the good place
|
||||||
#
|
#
|
||||||
# Note that the service need to be started manually at the end of the installation.
|
# Note that the service need to be started manually at the end of the installation.
|
||||||
# Generally you can start the service with this command:
|
# Generally you can start the service with this command:
|
||||||
# ynh_systemd_action --service_name "uwsgi-app@$app.service" --line_match "WSGI app 0 \(mountpoint='[/[:alnum:]_-]*'\) ready in [[:digit:]]* seconds on interpreter" --log_path "/var/log/uwsgi/$app/$app.log"
|
# ynh_systemd_action --service_name "uwsgi-app@$app.service" --line_match "WSGI app 0 \(mountpoint='[/[:alnum:]_-]*'\) ready in [[:digit:]]* seconds on interpreter" --log_path "/var/log/uwsgi/$app/$app.log"
|
||||||
|
@ -73,8 +73,8 @@ ynh_add_uwsgi_service () {
|
||||||
|
|
||||||
# To avoid a break by set -u, use a void substitution ${var:-}. If the variable is not set, it's simply set with an empty variable.
|
# To avoid a break by set -u, use a void substitution ${var:-}. If the variable is not set, it's simply set with an empty variable.
|
||||||
# Substitute in a nginx config file only if the variable is not empty
|
# Substitute in a nginx config file only if the variable is not empty
|
||||||
if test -n "${final_path:-}"; then
|
if test -n "${install_dir:-}"; then
|
||||||
ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="$finaluwsgiini"
|
ynh_replace_string --match_string="__INSTALL_DIR__" --replace_string="$install_dir" --target_file="$finaluwsgiini"
|
||||||
fi
|
fi
|
||||||
if test -n "${path_url:-}"; then
|
if test -n "${path_url:-}"; then
|
||||||
ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="$finaluwsgiini"
|
ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="$finaluwsgiini"
|
||||||
|
@ -87,7 +87,7 @@ ynh_add_uwsgi_service () {
|
||||||
for var_to_replace in $others_var
|
for var_to_replace in $others_var
|
||||||
do
|
do
|
||||||
# ${var_to_replace^^} make the content of the variable on upper-cases
|
# ${var_to_replace^^} make the content of the variable on upper-cases
|
||||||
# ${!var_to_replace} get the content of the variable named $var_to_replace
|
# ${!var_to_replace} get the content of the variable named $var_to_replace
|
||||||
ynh_replace_string --match_string="__${var_to_replace^^}__" --replace_string="${!var_to_replace}" --target_file="$finaluwsgiini"
|
ynh_replace_string --match_string="__${var_to_replace^^}__" --replace_string="${!var_to_replace}" --target_file="$finaluwsgiini"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ ynh_restore_uwsgi_service () {
|
||||||
mkdir -p /var/log/uwsgi/$app
|
mkdir -p /var/log/uwsgi/$app
|
||||||
chown $app:root /var/log/uwsgi/$app
|
chown $app:root /var/log/uwsgi/$app
|
||||||
chmod -R u=rwX,g=rX,o= /var/log/uwsgi/$app
|
chmod -R u=rwX,g=rX,o= /var/log/uwsgi/$app
|
||||||
|
|
||||||
yunohost service add "uwsgi-app@$app" --log "/var/log/uwsgi/$app/$app.log"
|
yunohost service add "uwsgi-app@$app" --log "/var/log/uwsgi/$app/$app.log"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ ynh_script_progression --message="Configuring application..."
|
||||||
config_pgadmin
|
config_pgadmin
|
||||||
|
|
||||||
# Config uwsgi
|
# Config uwsgi
|
||||||
ynh_add_uwsgi_service
|
ynh_add_uwsgi_service "python_version"
|
||||||
|
|
||||||
ynh_script_progression --message="Configuring sqlite database..."
|
ynh_script_progression --message="Configuring sqlite database..."
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue