mirror of
https://github.com/YunoHost-Apps/focalboard_ynh.git
synced 2024-09-03 18:36:19 +02:00
Fix
This commit is contained in:
parent
9121cf2a9d
commit
4bc706f8d0
5 changed files with 31 additions and 11 deletions
|
@ -5,7 +5,7 @@
|
|||
"dbconfig": "postgres://__DB_NAME__:__DB_PWD__@localhost/__DB_NAME__?sslmode=disable&connect_timeout=10",
|
||||
"useSSL": false,
|
||||
"webpath": "./pack",
|
||||
"filespath": "./files",
|
||||
"filespath": "/home/yunohost.app/__APP__/files",
|
||||
"telemetry": false,
|
||||
"session_expire_time": 2592000,
|
||||
"session_refresh_time": 18000,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
||||
location __PATH__/ {
|
||||
|
||||
# Force usage of https
|
||||
|
@ -47,3 +48,6 @@ location __PATH__/ws/ {
|
|||
proxy_read_timeout 1d;
|
||||
}
|
||||
|
||||
location __PATH__/uploads/ {
|
||||
alias __FILES_PATH__/uploads/ ;
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ ynh_install_app_dependencies $pkg_dependencies
|
|||
ynh_script_progression --message="Configuring system user..." --weight=11
|
||||
|
||||
# Create a system user
|
||||
ynh_system_user_create --username=$app
|
||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||
|
||||
#=================================================
|
||||
# CREATE A POSTGRESQL DATABASE
|
||||
|
@ -94,13 +94,22 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
|||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$final_path"
|
||||
|
||||
#=================================================
|
||||
# CREATE DIRECTORIES
|
||||
#=================================================
|
||||
|
||||
files_path=/home/yunohost.app/$app
|
||||
ynh_app_setting_set --app=$app --key=files_path --value=$files_path
|
||||
|
||||
mkdir -p $files_path/files
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring NGINX web server..." --weight=2
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
ynh_add_nginx_config "files_path"
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
|
@ -124,7 +133,9 @@ ynh_add_config --template="../conf/config.json" --destination="$final_path/confi
|
|||
|
||||
# Set permissions to app files
|
||||
chown -R $app:$app $final_path
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:$app $files_path
|
||||
#chmod -R o-rwx $final_path
|
||||
chmod -R 755 $files_path
|
||||
chmod 600 $final_path/config.json
|
||||
|
||||
#=================================================
|
||||
|
@ -140,7 +151,7 @@ yunohost service add $app --description="A short description of the app" --log="
|
|||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||
|
||||
# Start a systemd service
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
|
||||
ynh_systemd_action --service_name=$app --action=start --log_path="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
|
|
|
@ -66,7 +66,7 @@ ynh_restore_file --origin_path="$final_path"
|
|||
ynh_script_progression --message="Recreating the dedicated system user..." --weight=2
|
||||
|
||||
# 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
|
||||
|
@ -74,7 +74,9 @@ ynh_system_user_create --username=$app
|
|||
|
||||
# Restore permissions on app files
|
||||
chown -R $app:$app $final_path
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:$app $files_path
|
||||
#chmod -R o-rwx $final_path
|
||||
chmod -R 755 $files_path
|
||||
chmod 600 $final_path/config.json
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -20,6 +20,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
|
|||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||
files_path=$(ynh_app_setting_get --app=$app --key=files_path)
|
||||
|
||||
#=================================================
|
||||
# CHECK VERSION
|
||||
|
@ -60,7 +61,7 @@ ynh_abort_if_errors
|
|||
#=================================================
|
||||
ynh_script_progression --message="Stopping a systemd service..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log"
|
||||
ynh_systemd_action --service_name=$app --action=stop --log_path="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
|
@ -95,7 +96,7 @@ ynh_install_app_dependencies $pkg_dependencies
|
|||
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=3
|
||||
|
||||
# Create a dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app
|
||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
|
@ -119,7 +120,9 @@ ynh_add_config --template="some_config_file" --destination="$final_path/some_con
|
|||
|
||||
# Set permissions on app files
|
||||
chown -R $app:$app $final_path
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:$app $files_path
|
||||
#chmod -R o-rwx "$final_path"
|
||||
chmod -R 755 $files_path
|
||||
chmod 600 $final_path/config.json
|
||||
|
||||
#=================================================
|
||||
|
@ -142,7 +145,7 @@ yunohost service add $app --description="A short description of the app" --log="
|
|||
#=================================================
|
||||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
|
||||
ynh_systemd_action --service_name=$app --action=start --log_path="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
|
|
Loading…
Add table
Reference in a new issue