1
0
Fork 0
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:
yalh76 2019-02-05 15:50:10 +01:00
parent f2aad215c3
commit 44b376ba2c
5 changed files with 12 additions and 5 deletions

View file

@ -50,4 +50,3 @@ ynh_backup "/etc/systemd/system/$app.service"
#=================================================
mongodump --db "$app" -o "./dump"

View file

@ -14,13 +14,14 @@ source /usr/share/yunohost/helpers
#=================================================
# MANAGE SCRIPT FAILURE
#=================================================
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# RETRIEVE ARGUMENTS FROM THE MANIFEST
#=================================================
domain=$YNH_APP_ARG_DOMAIN
path_url=$YNH_APP_ARG_PATH
is_public=$YNH_APP_ARG_IS_PUBLIC
@ -96,6 +97,7 @@ ynh_system_user_create $app "$final_path"
#=================================================
# SPECIFIC SETUP
#=================================================
# Install wekan dependencies
ynh_print_info "Installing npm dependencies ..."
chown -R $app $final_path
@ -112,6 +114,7 @@ systemctl restart mongodb
#=================================================
# SETUP SYSTEMD
#=================================================
# Create a dedicated systemd config
ynh_print_info "Adding wekan systemd service ..."
ynh_replace_string "__NODEJS__" "$nodejs_use_version" "../conf/systemd.service"
@ -127,6 +130,7 @@ ynh_add_systemd_config
#=================================================
# SECURE FILES AND DIRECTORIES
#=================================================
ynh_print_info "Fixing permissions ..."
# Set strong right permissions to app files
chown -R $app: "$final_path"
@ -136,6 +140,7 @@ find "$final_path" -type d -print0 | xargs -0 chmod 750
#=================================================
# ADD SERVICE IN ADMIN PANEL
#=================================================
yunohost service add mongodb --log "/var/log/mongodb/mongodb.log"
yunohost service add $app

View file

@ -13,6 +13,7 @@ source /usr/share/yunohost/helpers
#=================================================
# LOAD SETTINGS
#=================================================
readonly app=$YNH_APP_INSTANCE_NAME
readonly domain=$(ynh_app_setting_get "$app" domain)
readonly final_path=$(ynh_app_setting_get "$app" final_path)
@ -42,6 +43,7 @@ ynh_remove_systemd_config
#=================================================
# REMOVE DB
#=================================================
mongo $app --eval "db.dropDatabase()"
#=================================================
@ -103,5 +105,3 @@ ynh_secure_remove "/var/log/$app/"
# Delete a system user
ynh_system_user_delete $app

View file

@ -80,6 +80,7 @@ ynh_install_app_dependencies "mongodb mongodb-server"
#=================================================
# RESTORE DB
#=================================================
# Start mogodb
systemctl enable mongodb
systemctl start mongodb
@ -99,6 +100,7 @@ popd
#=================================================
# SECURE FILES AND DIRECTORIES
#=================================================
# Set strong right permissions to app files
chown -R $app: "$final_path"
chmod -R 640 "$final_path"
@ -114,6 +116,7 @@ systemctl enable $app.service
#=================================================
# ADVERTISE SERVICE IN ADMIN PANEL
#=================================================
yunohost service add mongodb --log "/var/log/mongodb/mongodb.log"
yunohost service add $app

View file

@ -26,6 +26,7 @@ port=$(ynh_app_setting_get $app port)
#=================================================
# Check version
#=================================================
abort_if_up_to_date
# previous function is what defines 'version', more precisely the 'previous version'
previous_version="${version}"
@ -90,7 +91,6 @@ if ynh_version_gt "1.07~ynh2" "${previous_version}" ; then
ynh_add_systemd_config
fi
#=================================================
# STANDARD UPGRADE STEPS
#=================================================