mirror of
https://github.com/YunoHost-Apps/firefly-iii_ynh.git
synced 2024-09-03 18:36:13 +02:00
Set rights
This commit is contained in:
parent
9fde417d53
commit
c3101ca39c
4 changed files with 13 additions and 38 deletions
|
@ -28,11 +28,6 @@ ynh_script_progression --message="Loading installation settings..."
|
||||||
|
|
||||||
# Needed for helper "ynh_add_nginx_config"
|
# Needed for helper "ynh_add_nginx_config"
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
|
|
||||||
# Add settings here as needed by your application
|
|
||||||
#db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
|
||||||
#db_user=$db_name
|
|
||||||
#db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd)
|
|
||||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -86,6 +86,10 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||||
|
|
||||||
git clone -b $tag --depth 1 https://github.com/firefly-iii/firefly-iii.git $final_path
|
git clone -b $tag --depth 1 https://github.com/firefly-iii/firefly-iii.git $final_path
|
||||||
|
|
||||||
|
chmod 750 "$final_path"
|
||||||
|
chmod -R o-rwx "$final_path"
|
||||||
|
chown -R $app:www-data "$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -120,7 +124,7 @@ ynh_script_progression --message="Modifying a config file..."
|
||||||
ynh_add_config --template="../conf/.env" --destination="$final_path/.env"
|
ynh_add_config --template="../conf/.env" --destination="$final_path/.env"
|
||||||
|
|
||||||
chmod 400 "$final_path/.env"
|
chmod 400 "$final_path/.env"
|
||||||
chown $app:$app "$final_path/.env"
|
chown $app "$final_path/.env"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DEPLOY
|
# DEPLOY
|
||||||
|
@ -133,17 +137,6 @@ pushd "$final_path"
|
||||||
php$phpversion artisan passport:install
|
php$phpversion artisan passport:install
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# GENERIC FINALIZATION
|
|
||||||
#=================================================
|
|
||||||
# SECURE FILES AND DIRECTORIES
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Securing files and directories..."
|
|
||||||
|
|
||||||
# Set right permissions
|
|
||||||
chown -R $app: $final_path
|
|
||||||
chmod -R 775 $final_path/storage
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP A CRON
|
# SETUP A CRON
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -65,13 +65,9 @@ ynh_script_progression --message="Restoring the app main directory..."
|
||||||
|
|
||||||
ynh_restore_file --origin_path="$final_path"
|
ynh_restore_file --origin_path="$final_path"
|
||||||
|
|
||||||
#=================================================
|
chmod 750 "$final_path"
|
||||||
# RESTORE USER RIGHTS
|
chmod -R o-rwx "$final_path"
|
||||||
#=================================================
|
chown -R $app:www-data "$final_path"
|
||||||
ynh_script_progression --message="Restoring user rights..."
|
|
||||||
|
|
||||||
# Restore permissions on app files
|
|
||||||
chown -R $app: $final_path
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE PHP-FPM CONFIGURATION
|
# RESTORE THE PHP-FPM CONFIGURATION
|
||||||
|
|
|
@ -140,6 +140,10 @@ then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
chmod 750 "$final_path"
|
||||||
|
chmod -R o-rwx "$final_path"
|
||||||
|
chown -R $app:www-data "$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -171,8 +175,6 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Updating PHP dependencies..."
|
ynh_script_progression --message="Updating PHP dependencies..."
|
||||||
|
|
||||||
chown -R $app: $final_path
|
|
||||||
|
|
||||||
ynh_exec_warn_less ynh_install_composer --phpversion="$phpversion" --workdir="$final_path"
|
ynh_exec_warn_less ynh_install_composer --phpversion="$phpversion" --workdir="$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -183,7 +185,7 @@ ynh_script_progression --message="Modifying a config file..."
|
||||||
ynh_add_config --template="../conf/.env" --destination="$final_path/.env"
|
ynh_add_config --template="../conf/.env" --destination="$final_path/.env"
|
||||||
|
|
||||||
chmod 400 "$final_path/.env"
|
chmod 400 "$final_path/.env"
|
||||||
chown $app:$app "$final_path/.env"
|
chown $app "$final_path/.env"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DEPLOYMENT
|
# DEPLOYMENT
|
||||||
|
@ -207,17 +209,6 @@ ynh_script_progression --message="Upgrading logrotate configuration..."
|
||||||
# Use logrotate to manage app-specific logfile(s)
|
# Use logrotate to manage app-specific logfile(s)
|
||||||
ynh_use_logrotate --non-append
|
ynh_use_logrotate --non-append
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# GENERIC FINALIZATION
|
|
||||||
#=================================================
|
|
||||||
# SECURE FILES AND DIRECTORIES
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Securing files and directories..."
|
|
||||||
|
|
||||||
# Set permissions on app files
|
|
||||||
chown -R $app: $final_path
|
|
||||||
chmod -R 775 $final_path/storage
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP A CRON
|
# SETUP A CRON
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue