Fixed permission issue
This commit is contained in:
parent
54efc0fd80
commit
a84c733f89
|
@ -142,12 +142,9 @@ touch "$final_path/config/local-production.json"
|
||||||
mkdir -p "/etc/nginx/conf.d/${domain}.d"
|
mkdir -p "/etc/nginx/conf.d/${domain}.d"
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SETUP APPLICATION WITH CURL
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
# Set right permissions for curl install
|
# Set right permissions for curl install
|
||||||
chown -R "$app" "$datadir"
|
chown -R "$app":"app" "$datadir"
|
||||||
|
|
||||||
# Reload Nginx
|
# Reload Nginx
|
||||||
systemctl reload nginx
|
systemctl reload nginx
|
||||||
|
@ -179,7 +176,7 @@ ynh_store_file_checksum "$final_path/config/production.yaml"
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Use logrotate to manage application logfile(s)
|
# Use logrotate to manage application logfile(s)
|
||||||
ynh_use_logrotate
|
ynh_use_logrotate "/home/yunohost.app/${app}/storage/logs/peertube.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SSOWAT
|
# SETUP SSOWAT
|
||||||
|
@ -211,6 +208,9 @@ systemctl start "$app"
|
||||||
# we need to wait for the service to init peertube's database
|
# we need to wait for the service to init peertube's database
|
||||||
(cd "/var/www/$app" && sleep 15 && exec /bin/sh -c "echo $admin_pass | NODE_CONFIG_DIR=/var/www/$app/config NODE_ENV=production PATH=/opt/node_n/bin:$PATH npm run reset-password -- -u root")
|
(cd "/var/www/$app" && sleep 15 && exec /bin/sh -c "echo $admin_pass | NODE_CONFIG_DIR=/var/www/$app/config NODE_ENV=production PATH=/opt/node_n/bin:$PATH npm run reset-password -- -u root")
|
||||||
|
|
||||||
|
# Give permisiion to the final_path
|
||||||
|
chown -R "$app":"$app" "$final_path" "$datadir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -79,9 +79,9 @@ ynh_system_user_create "$app"
|
||||||
# RESTORE USER RIGHTS
|
# RESTORE USER RIGHTS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Set right permissions for curl install
|
# Set right permissions
|
||||||
datadir="/home/yunohost.app/${app}/storage"
|
datadir="/home/yunohost.app/${app}/storage"
|
||||||
chown -R "$app" "$datadir"
|
chown -R "$app":"app" "$datadir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC RESTORATION
|
# SPECIFIC RESTORATION
|
||||||
|
@ -132,6 +132,9 @@ ynh_restore_file "/etc/logrotate.d/$app"
|
||||||
|
|
||||||
(cd "$final_path" && yarn install --production --pure-lockfile)
|
(cd "$final_path" && yarn install --production --pure-lockfile)
|
||||||
|
|
||||||
|
# Set right permissions for curl install
|
||||||
|
chown -R "$app":"app" "$datadir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -159,8 +159,8 @@ ynh_use_logrotate --non-append
|
||||||
ynh_add_systemd_config
|
ynh_add_systemd_config
|
||||||
|
|
||||||
|
|
||||||
# Set right permissions for curl installation
|
# Set right permissions
|
||||||
chown -R "$app":$app "$final_path" "$datadir"
|
chown -R "$app":"$app" "$final_path" "$datadir"
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue