1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pepettes_ynh.git synced 2024-09-03 19:56:35 +02:00

Fix multi

This commit is contained in:
yalh76 2021-03-05 14:44:04 +01:00
parent 0234bd4849
commit a748f8552d
3 changed files with 6 additions and 18 deletions

View file

@ -109,7 +109,7 @@ ynh_add_nginx_config
ynh_script_progression --message="Configuring system user..." --weight=1
# Create a system user
ynh_system_user_create --username=$app
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# SPECIFIC SETUP
@ -164,10 +164,7 @@ done
ynh_script_progression --message="Securing files and directories..."
# Set permissions to app files
chown -R root: $final_path
chown $app:root $final_path
chown $app:root $final_path/settings.py
chmod o=--- $final_path/settings.py
chown -R $app:root $final_path
#=================================================
# INTEGRATE SERVICE IN YUNOHOST

View file

@ -64,7 +64,7 @@ ynh_restore_file --origin_path="$final_path"
ynh_script_progression --message="Recreating the dedicated system user..." --weight=1
# Create the dedicated user (if not existing)
ynh_system_user_create --username=$app
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# RESTORE USER RIGHTS
@ -72,7 +72,7 @@ ynh_system_user_create --username=$app
ynh_script_progression --message="Restoring user rights..."
# Restore permissions on app files
chown -R root: $final_path
chown -R $app:root $final_path
#=================================================
# SPECIFIC RESTORATION
@ -97,12 +97,6 @@ pushd $final_path
$ynh_pip install gunicorn
mkdir -p /var/log/$app
chown -R $app:www-data /var/log/$app
cat <<EOF >> wsgi.py
from server import app
if __name__ == "__main__":
app.run()
EOF
popd
#=================================================

View file

@ -101,7 +101,7 @@ ynh_install_python --python_version=$python_version
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# SPECIFIC UPGRADE
@ -156,10 +156,7 @@ done
ynh_script_progression --message="Securing files and directories..."
# Set permissions on app files
chown -R root: $final_path
chown $app:root $final_path
chown $app:root $final_path/settings.py
chmod o=--- $final_path/settings.py
chown -R $app:root $final_path
#=================================================
# INTEGRATE SERVICE IN YUNOHOST