Change order of instruction and fix uwsgi helper
This commit is contained in:
@@ -98,12 +98,6 @@ ynh_install_app_dependencies python-dev python-virtualenv \
|
||||
`# ARM support: ` \
|
||||
build-essential libssl-dev libffi-dev
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC SETUP UWSGI
|
||||
#=================================================
|
||||
|
||||
ynh_add_uwsgi_service
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
@@ -139,25 +133,6 @@ fi
|
||||
# Create a system user
|
||||
ynh_system_user_create "$app"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC UPGRADE
|
||||
#=================================================
|
||||
|
||||
# Copy Files
|
||||
ynh_replace_string "__APP__" "$app" "$finaluwsgiini"
|
||||
ynh_replace_string "__DOMAIN__" "$domain" "$finaluwsgiini"
|
||||
ynh_replace_string "__PATH__" "$path_url" "$finaluwsgiini"
|
||||
ynh_replace_string "__NAME__" "$app" "$finaluwsgiini"
|
||||
ynh_replace_string "__FINALPATH__" "$final_path" "$finaluwsgiini"
|
||||
ynh_replace_string "__SECRET__" "$secret" "$finaluwsgiini"
|
||||
|
||||
ynh_replace_string "__DB_USER__" "$db_user" "$finaluwsgiini"
|
||||
ynh_replace_string "__DB_PWD__" "$db_pwd" "$finaluwsgiini"
|
||||
ynh_replace_string "__DB_NAME__" "$db_name" "$finaluwsgiini"
|
||||
|
||||
rm "$final_path/syncserver.ini"
|
||||
ln -s "$finaluwsgiini" "$final_path/syncserver.ini"
|
||||
|
||||
#=================================================
|
||||
# pip installation
|
||||
#=================================================
|
||||
@@ -184,8 +159,6 @@ virtualenv "$final_path/local"
|
||||
cp -r ../sources/page $final_path/syncserver/
|
||||
(cd "$final_path/syncserver" && patch -p1 < $YNH_CWD/../sources/homepage.patch) || echo "Unable to apply patches"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
# SECURE FILES AND DIRECTORIES
|
||||
#=================================================
|
||||
@@ -193,6 +166,19 @@ cp -r ../sources/page $final_path/syncserver/
|
||||
chown $app -R $final_path
|
||||
chmod u=rwX,g=rX,o= -R $final_path
|
||||
|
||||
#=================================================
|
||||
# SETUP UWSGI
|
||||
#=================================================
|
||||
|
||||
# create config file syncserver.ini
|
||||
rm "$final_path/syncserver.ini"
|
||||
ln -s "/etc/uwsgi/apps-available/$app.ini" "$final_path/syncserver.ini"
|
||||
|
||||
# configure uwsgi
|
||||
ynh_add_uwsgi_service 'domain secret db_user db_pwd db_name'
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
# SETUP LOGROTATE
|
||||
#=================================================
|
||||
|
||||
Reference in New Issue
Block a user