mirror of
https://github.com/YunoHost-Apps/mattermost_ynh.git
synced 2024-09-03 19:36:29 +02:00
Fix
This commit is contained in:
parent
89f6da98c1
commit
7169b70270
2 changed files with 19 additions and 21 deletions
|
@ -68,7 +68,7 @@ ynh_script_progression --message="Removing $app main directory..." --weight=6
|
||||||
# Remove the app directory securely
|
# Remove the app directory securely
|
||||||
ynh_secure_remove --file="$final_path"
|
ynh_secure_remove --file="$final_path"
|
||||||
|
|
||||||
ynh_secure_remove "$data_path"
|
ynh_secure_remove --file="$data_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE NGINX CONFIGURATION
|
# REMOVE NGINX CONFIGURATION
|
||||||
|
|
|
@ -23,14 +23,12 @@ ynh_script_progression --message="Loading installation settings..." --weight=2
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
domain=$(ynh_app_setting_get $app domain)
|
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||||
path_url=$(ynh_app_setting_get $app path)
|
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||||
is_public=$(ynh_app_setting_get $app is_public)
|
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
|
||||||
port=$(ynh_app_setting_get $app port)
|
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||||
mattermost_user="$app"
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
|
|
||||||
root_path="$(pwd)/.."
|
root_path="$(pwd)/.."
|
||||||
final_path="/var/www/$app"
|
|
||||||
data_path="/home/yunohost.app/$app"
|
data_path="/home/yunohost.app/$app"
|
||||||
logs_path="/var/log/$app"
|
logs_path="/var/log/$app"
|
||||||
|
|
||||||
|
@ -135,25 +133,25 @@ ynh_add_systemd_config
|
||||||
# SPECIFIC UPGRADE STEPS
|
# SPECIFIC UPGRADE STEPS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Fix log FileLocation path (changed in Mattermost 3.8, makes Mattermost >= 4.2 crash)
|
# # Fix log FileLocation path (changed in Mattermost 3.8, makes Mattermost >= 4.2 crash)
|
||||||
# https://docs.mattermost.com/administration/changelog.html#release-v3-8-3
|
# # https://docs.mattermost.com/administration/changelog.html#release-v3-8-3
|
||||||
ynh_replace_string --match_string "\"FileLocation\": \"/var/log/mattermost.log\"" --replace_string "\"FileLocation\": \"/var/log\"" --target_file "$config_file"
|
# ynh_replace_string --match_string "\"FileLocation\": \"/var/log/mattermost.log\"" --replace_string "\"FileLocation\": \"/var/log\"" --target_file "$config_file"
|
||||||
|
|
||||||
# Move log files to a directory (rather than directly in /var/log)
|
# # Move log files to a directory (rather than directly in /var/log)
|
||||||
# See https://github.com/YunoHost-Apps/mattermost_ynh/issues/61
|
# # See https://github.com/YunoHost-Apps/mattermost_ynh/issues/61
|
||||||
mkdir -p "$logs_path"
|
# mkdir -p "$logs_path"
|
||||||
ynh_replace_string --match_string "\"FileLocation\": \"/var/log\"" --replace_string "\"FileLocation\": \"$logs_path\"" --target_file "$config_file"
|
# ynh_replace_string --match_string "\"FileLocation\": \"/var/log\"" --replace_string "\"FileLocation\": \"$logs_path\"" --target_file "$config_file"
|
||||||
if [ -f "/var/log/${app}.log" ]; then
|
# if [ -f "/var/log/${app}.log" ]; then
|
||||||
mv "/var/log/${app}.log" "$logs_path/"
|
# mv "/var/log/${app}.log" "$logs_path/"
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE FILE PERMISSIONS
|
# RESTORE FILE PERMISSIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
chown -R "$app:www-data" "$final_path"
|
chown -R $app: $final_path
|
||||||
chown -R "$app:www-data" "$data_path"
|
chown -R $app: $data_path
|
||||||
chown -R "$app:adm" "$logs_path"
|
chown -R $app: $logs_path
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INTEGRATE SERVICE IN YUNOHOST
|
# INTEGRATE SERVICE IN YUNOHOST
|
||||||
|
|
Loading…
Add table
Reference in a new issue