mirror of
https://github.com/YunoHost-Apps/wekan_ynh.git
synced 2024-09-03 20:36:09 +02:00
Manage spacing
This commit is contained in:
parent
f2aad215c3
commit
44b376ba2c
5 changed files with 12 additions and 5 deletions
|
@ -50,4 +50,3 @@ ynh_backup "/etc/systemd/system/$app.service"
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
mongodump --db "$app" -o "./dump"
|
mongodump --db "$app" -o "./dump"
|
||||||
|
|
||||||
|
|
|
@ -14,13 +14,14 @@ source /usr/share/yunohost/helpers
|
||||||
#=================================================
|
#=================================================
|
||||||
# MANAGE SCRIPT FAILURE
|
# MANAGE SCRIPT FAILURE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Exit if an error occurs during the execution of the script
|
# Exit if an error occurs during the execution of the script
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
domain=$YNH_APP_ARG_DOMAIN
|
domain=$YNH_APP_ARG_DOMAIN
|
||||||
path_url=$YNH_APP_ARG_PATH
|
path_url=$YNH_APP_ARG_PATH
|
||||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||||
|
@ -96,6 +97,7 @@ ynh_system_user_create $app "$final_path"
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC SETUP
|
# SPECIFIC SETUP
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Install wekan dependencies
|
# Install wekan dependencies
|
||||||
ynh_print_info "Installing npm dependencies ..."
|
ynh_print_info "Installing npm dependencies ..."
|
||||||
chown -R $app $final_path
|
chown -R $app $final_path
|
||||||
|
@ -112,6 +114,7 @@ systemctl restart mongodb
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SYSTEMD
|
# SETUP SYSTEMD
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Create a dedicated systemd config
|
# Create a dedicated systemd config
|
||||||
ynh_print_info "Adding wekan systemd service ..."
|
ynh_print_info "Adding wekan systemd service ..."
|
||||||
ynh_replace_string "__NODEJS__" "$nodejs_use_version" "../conf/systemd.service"
|
ynh_replace_string "__NODEJS__" "$nodejs_use_version" "../conf/systemd.service"
|
||||||
|
@ -127,6 +130,7 @@ ynh_add_systemd_config
|
||||||
#=================================================
|
#=================================================
|
||||||
# SECURE FILES AND DIRECTORIES
|
# SECURE FILES AND DIRECTORIES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_print_info "Fixing permissions ..."
|
ynh_print_info "Fixing permissions ..."
|
||||||
# Set strong right permissions to app files
|
# Set strong right permissions to app files
|
||||||
chown -R $app: "$final_path"
|
chown -R $app: "$final_path"
|
||||||
|
@ -136,6 +140,7 @@ find "$final_path" -type d -print0 | xargs -0 chmod 750
|
||||||
#=================================================
|
#=================================================
|
||||||
# ADD SERVICE IN ADMIN PANEL
|
# ADD SERVICE IN ADMIN PANEL
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
yunohost service add mongodb --log "/var/log/mongodb/mongodb.log"
|
yunohost service add mongodb --log "/var/log/mongodb/mongodb.log"
|
||||||
yunohost service add $app
|
yunohost service add $app
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ source /usr/share/yunohost/helpers
|
||||||
#=================================================
|
#=================================================
|
||||||
# LOAD SETTINGS
|
# LOAD SETTINGS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
readonly app=$YNH_APP_INSTANCE_NAME
|
readonly app=$YNH_APP_INSTANCE_NAME
|
||||||
readonly domain=$(ynh_app_setting_get "$app" domain)
|
readonly domain=$(ynh_app_setting_get "$app" domain)
|
||||||
readonly final_path=$(ynh_app_setting_get "$app" final_path)
|
readonly final_path=$(ynh_app_setting_get "$app" final_path)
|
||||||
|
@ -42,6 +43,7 @@ ynh_remove_systemd_config
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE DB
|
# REMOVE DB
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
mongo $app --eval "db.dropDatabase()"
|
mongo $app --eval "db.dropDatabase()"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -103,5 +105,3 @@ ynh_secure_remove "/var/log/$app/"
|
||||||
|
|
||||||
# Delete a system user
|
# Delete a system user
|
||||||
ynh_system_user_delete $app
|
ynh_system_user_delete $app
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -80,6 +80,7 @@ ynh_install_app_dependencies "mongodb mongodb-server"
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE DB
|
# RESTORE DB
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Start mogodb
|
# Start mogodb
|
||||||
systemctl enable mongodb
|
systemctl enable mongodb
|
||||||
systemctl start mongodb
|
systemctl start mongodb
|
||||||
|
@ -99,6 +100,7 @@ popd
|
||||||
#=================================================
|
#=================================================
|
||||||
# SECURE FILES AND DIRECTORIES
|
# SECURE FILES AND DIRECTORIES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Set strong right permissions to app files
|
# Set strong right permissions to app files
|
||||||
chown -R $app: "$final_path"
|
chown -R $app: "$final_path"
|
||||||
chmod -R 640 "$final_path"
|
chmod -R 640 "$final_path"
|
||||||
|
@ -114,6 +116,7 @@ systemctl enable $app.service
|
||||||
#=================================================
|
#=================================================
|
||||||
# ADVERTISE SERVICE IN ADMIN PANEL
|
# ADVERTISE SERVICE IN ADMIN PANEL
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
yunohost service add mongodb --log "/var/log/mongodb/mongodb.log"
|
yunohost service add mongodb --log "/var/log/mongodb/mongodb.log"
|
||||||
yunohost service add $app
|
yunohost service add $app
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ port=$(ynh_app_setting_get $app port)
|
||||||
#=================================================
|
#=================================================
|
||||||
# Check version
|
# Check version
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
abort_if_up_to_date
|
abort_if_up_to_date
|
||||||
# previous function is what defines 'version', more precisely the 'previous version'
|
# previous function is what defines 'version', more precisely the 'previous version'
|
||||||
previous_version="${version}"
|
previous_version="${version}"
|
||||||
|
@ -90,7 +91,6 @@ if ynh_version_gt "1.07~ynh2" "${previous_version}" ; then
|
||||||
ynh_add_systemd_config
|
ynh_add_systemd_config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD UPGRADE STEPS
|
# STANDARD UPGRADE STEPS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue