Remove useless user rights

pull/6/head
Jean-Baptiste Holcroft 7 years ago
parent 333e0973e6
commit 23645f9f33

@ -4,13 +4,13 @@
domain="domain.tld" (DOMAIN) domain="domain.tld" (DOMAIN)
path="/path" (PATH) path="/path" (PATH)
; Checks ; Checks
pkg_linter=0 pkg_linter=1
setup_sub_dir=0 setup_sub_dir=1
setup_root=0 setup_root=1
setup_nourl=0 setup_nourl=0
setup_private=0 setup_private=0
setup_public=0 setup_public=1
upgrade=0 upgrade=1
# test upgrade from latest published version # test upgrade from latest published version
upgrade=1 from_commit=fd6350495d5a1d864ae30e1a61e18939fdb6a428 upgrade=1 from_commit=fd6350495d5a1d864ae30e1a61e18939fdb6a428
# test upgrade from latest git commit before Jibec's rewriting # test upgrade from latest git commit before Jibec's rewriting

@ -11,5 +11,5 @@ location __PATH__ {
uwsgi_read_timeout 3600; uwsgi_read_timeout 3600;
uwsgi_param SCRIPT_NAME __PATH__; uwsgi_param SCRIPT_NAME __PATH__;
uwsgi_modifier1 30; uwsgi_modifier1 30;
uwsgi_pass unix://__FINALPATH__/socket; uwsgi_pass unix:///tmp/__NAME__.socket;
} }

@ -2,7 +2,7 @@
plugins = python plugins = python
master = true master = true
protocol = uwsgi protocol = uwsgi
socket = __FINALPATH__/socket socket = /tmp/__APP__.socket
virtualenv = __FINALPATH__/local virtualenv = __FINALPATH__/local
wsgi-file = __FINALPATH__/syncserver.wsgi wsgi-file = __FINALPATH__/syncserver.wsgi
python-path = __FINALPATH__/local python-path = __FINALPATH__/local

@ -10,7 +10,7 @@ RemainAfterExit=yes
WorkingDirectory=__FINALPATH__ WorkingDirectory=__FINALPATH__
ExecStart=/usr/bin/uwsgi \ ExecStart=/usr/bin/uwsgi \
--ini __FINALPATH__/syncserver.ini \ --ini __FINALPATH__/syncserver.ini \
--socket __FINALPATH__/socket --socket /tmp/__APP__.socket
Restart=always Restart=always
StandardError=syslog StandardError=syslog

@ -126,6 +126,7 @@ ynh_app_setting_set "$app" secret "$secret"
# Copy Files # Copy Files
cp ../conf/syncserver.ini "$final_path/syncserver.ini" cp ../conf/syncserver.ini "$final_path/syncserver.ini"
ynh_replace_string "__APP__" "$app" "$final_path/syncserver.ini"
ynh_replace_string "__DOMAIN__" "$domain" "$final_path/syncserver.ini" ynh_replace_string "__DOMAIN__" "$domain" "$final_path/syncserver.ini"
ynh_replace_string "__PATH__" "$path_url" "$final_path/syncserver.ini" ynh_replace_string "__PATH__" "$path_url" "$final_path/syncserver.ini"
ynh_replace_string "__NAME__" "$app" "$final_path/syncserver.ini" ynh_replace_string "__NAME__" "$app" "$final_path/syncserver.ini"
@ -160,9 +161,7 @@ ynh_replace_string "__DB_NAME__" "$db_name" "$final_path/syncserver.ini"
# SECURE FILES AND DIRECTORIES # SECURE FILES AND DIRECTORIES
#================================================= #=================================================
chown "$app":"$app" -R "$final_path" # no need, keep the default root:root
find "$final_path"/ -type d -exec chmod 2755 {} \;
find "$final_path"/ -type f -exec chmod g+r,o+r {} \;
#================================================= #=================================================
# SETUP LOGROTATE # SETUP LOGROTATE

@ -74,9 +74,7 @@ ynh_system_user_create "$app"
# RESTORE USER RIGHTS # RESTORE USER RIGHTS
#================================================= #=================================================
chown "$app":"$app" -R "$final_path" # no need, keep the default root:root
find "$final_path"/ -type d -exec chmod 2755 {} \;
find "$final_path"/ -type f -exec chmod g+r,o+r {} \;
#================================================= #=================================================
# SPECIFIC RESTORATION # SPECIFIC RESTORATION

@ -127,6 +127,7 @@ ynh_system_user_create "$app"
# Copy Files # Copy Files
cp ../conf/syncserver.ini "$final_path/syncserver.ini" cp ../conf/syncserver.ini "$final_path/syncserver.ini"
ynh_replace_string "__APP__" "$app" "$final_path/syncserver.ini"
ynh_replace_string "__DOMAIN__" "$domain" "$final_path/syncserver.ini" ynh_replace_string "__DOMAIN__" "$domain" "$final_path/syncserver.ini"
ynh_replace_string "__PATH__" "$path_url" "$final_path/syncserver.ini" ynh_replace_string "__PATH__" "$path_url" "$final_path/syncserver.ini"
ynh_replace_string "__NAME__" "$app" "$final_path/syncserver.ini" ynh_replace_string "__NAME__" "$app" "$final_path/syncserver.ini"
@ -143,9 +144,7 @@ ynh_replace_string "__DB_NAME__" "$db_name" "$final_path/syncserver.ini"
# SECURE FILES AND DIRECTORIES # SECURE FILES AND DIRECTORIES
#================================================= #=================================================
chown "$app":"$app" -R "$final_path" # no need, keep the default root:root
find "$final_path"/ -type d -exec chmod 2755 {} \;
find "$final_path"/ -type f -exec chmod g+r,o+r {} \;
#================================================= #=================================================
# SETUP LOGROTATE # SETUP LOGROTATE

Loading…
Cancel
Save