diff --git a/scripts/_future.sh b/scripts/_future.sh index abdb7ed..83a5313 100644 --- a/scripts/_future.sh +++ b/scripts/_future.sh @@ -209,3 +209,5 @@ EOF chmod +x "/etc/cron.daily/node_update" } + +ynh_version_gt() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"; } diff --git a/scripts/install b/scripts/install index 40370bf..a40e004 100755 --- a/scripts/install +++ b/scripts/install @@ -118,6 +118,7 @@ find "$final_path" -type d -print0 | xargs -0 chmod 750 # ADD SERVICE IN ADMIN PANEL #================================================= yunohost service add mongod --log "/var/log/mongodb.log" +yunohost service add wekan #================================================= # SETUP SSOWAT diff --git a/scripts/restore b/scripts/restore index 998b396..e620557 100644 --- a/scripts/restore +++ b/scripts/restore @@ -93,6 +93,7 @@ find "$final_path" -type d -print0 | xargs -0 chmod 750 # ADD SERVICE IN ADMIN PANEL #================================================= yunohost service add mongod --log "/var/log/mongodb.log" +yunohost service add wekan #================================================= # SETUP SSOWAT diff --git a/scripts/upgrade b/scripts/upgrade index 9583409..2d4cc31 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -40,10 +40,13 @@ ynh_abort_if_errors # Exit if an error occurs during the execution of the script # ENSURE DOWNWARD COMPATIBILITY #================================================= -if [ "${version}" = "0.45-1" ]; then +if ynh_version_gt "0.45-2" "${version}" ; then ynh_replace_string "Environment=ROOT_URL=http://127.0.0.1:$port$path_url" "Environment=ROOT_URL=https://$domain$path_url/" "/etc/systemd/system/$app.service" systemctl daemon-reload fi +if ynh_version_gt "0.45-3" "${version}" ; then + yunohost service add wekan +fi #================================================= # STANDARD UPGRADE STEPS