diff --git a/README.md b/README.md index 91ff443..a446a8c 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Self-hosted To-Do list application -**Shipped version:** 0.18.1~ynh3 +**Shipped version:** 0.18.1~ynh4 **Demo:** https://try.vikunja.io/login diff --git a/conf/front.src b/conf/front.src index c9d3457..80f5a3b 100644 --- a/conf/front.src +++ b/conf/front.src @@ -1,7 +1,6 @@ -SOURCE_URL=https://dl.vikunja.io/frontend/vikunja-frontend-0.18.1.zip -SOURCE_SUM=bb85c0e89aa7fa9d89d2c07629a6f0658fe517065a91912f51487f7a7ae1b4de +SOURCE_URL=https://dl.vikunja.io/frontend/vikunja-frontend-0.18.2.zip +SOURCE_SUM=d2f1069f91ba660fe898d4df7efb40a35dbe743dadaa853a09c79955521ee16f SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=false -SOURCE_FILENAME= SOURCE_EXTRACT=true \ No newline at end of file diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md new file mode 100644 index 0000000..2467012 --- /dev/null +++ b/doc/DESCRIPTION.md @@ -0,0 +1,10 @@ +Vikunja is a self-hosted open-source to-do list application for all platforms. + +### Features + +- Stay organized +- Collaborate with peers +- Tasks +- Kanban board +- CalDAV +- Links \ No newline at end of file diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md index 22f755e..e1f69a4 100644 --- a/doc/DESCRIPTION_fr.md +++ b/doc/DESCRIPTION_fr.md @@ -1 +1,10 @@ -Vikunja est une application de liste de tâches Open Source auto-hébergée pour toutes les plateformes. \ No newline at end of file +Vikunja est une application de liste de tâches Open Source auto-hébergée pour toutes les plateformes. + +### Features + +- Stay organized +- Collaborate with peers +- Tasks +- Kanban board +- CalDAV +- Links \ No newline at end of file diff --git a/manifest.json b/manifest.json index cfd6598..59d481b 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Self-hosted To-Do list application", "fr": "Application de liste de tâches auto-hébergée" }, - "version": "0.18.1~ynh3", + "version": "0.18.1~ynh4", "url": "https://vikunja.io/", "upstream": { "license": "GPL-3.0", diff --git a/scripts/_common.sh b/scripts/_common.sh index 2bd68b5..4d4651e 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -19,34 +19,6 @@ pkg_dependencies="postgresql apt-transport-https" # FUTURE OFFICIAL HELPERS #================================================= -# Check the architecture -# -# example: architecture=$(ynh_detect_arch) -# -# usage: ynh_detect_arch -# -# Requires YunoHost version 2.2.4 or higher. - -ynh_detect_arch(){ - local architecture - if [ -n "$(uname -m | grep arm64)" ] || [ -n "$(uname -m | grep aarch64)" ]; then - architecture="arm64" - elif [ -n "$(uname -m | grep 64)" ]; then - architecture="amd64" - elif [ -n "$(uname -m | grep 86)" ]; then - architecture="386" - elif [ -n "$(uname -m | grep armv7)" ]; then - architecture="arm7" - elif [ -n "$(uname -m | grep armv6)" ]; then - architecture="arm6" - elif [ -n "$(uname -m | grep armv5)" ]; then - architecture="arm5" - else - architecture="unknown" - fi - echo $architecture -} - #================================================= # REDIS HELPERS #================================================= diff --git a/scripts/install b/scripts/install index 87fcf8b..b5a65c2 100644 --- a/scripts/install +++ b/scripts/install @@ -24,7 +24,6 @@ domain=$YNH_APP_ARG_DOMAIN path_url="/" is_public=$YNH_APP_ARG_IS_PUBLIC timezone="$(cat /etc/timezone)" -architecture=$(ynh_detect_arch) secret=$(ynh_string_random --length=32) app=$YNH_APP_INSTANCE_NAME @@ -108,7 +107,11 @@ ynh_script_progression --message="Installing backend..." --weight=15 tempdir="$(mktemp -d)" ynh_setup_source --dest_dir=$tempdir --source_id=api ynh_exec_warn_less dpkg -i $tempdir/vikunja-unstable-amd64.deb + +mkdir -p "/opt/vikunja/files" + chmod +x "/opt/vikunja/vikunja" +chown -R $app:www-data "/opt/vikunja/files" #================================================= # NGINX CONFIGURATION @@ -128,8 +131,6 @@ ynh_app_setting_set --app=$app --key=path --value=$smtp_user_pwd redis_db=$(ynh_redis_get_free_db) ynh_add_config --template="../conf/config.yml" --destination="/etc/vikunja/config.yml" -#chmod 600 "/etc/vikunja/config.yml" - #================================================= # SETUP SYSTEMD #================================================= diff --git a/scripts/remove b/scripts/remove index 00d6e5d..c17afff 100644 --- a/scripts/remove +++ b/scripts/remove @@ -74,7 +74,7 @@ ynh_script_progression --message="Removing $app main directory..." --weight=6 # Remove the app directory securely ynh_secure_remove --file="$final_path" -ynh_secure_remove --file="/etc/vikunja" +#ynh_secure_remove --file="/etc/vikunja" #================================================= # REMOVE NGINX CONFIGURATION diff --git a/scripts/restore b/scripts/restore index 507b857..a5f7ea0 100644 --- a/scripts/restore +++ b/scripts/restore @@ -69,6 +69,7 @@ ynh_restore_file --origin_path="/etc/vikunja/config.yml" ynh_restore_file --origin_path="/opt/vikunja" chmod +x "/opt/vikunja/vikunja" +chown -R $app:www-data "/opt/vikunja/files" #================================================= # REINSTALL DEPENDENCIES diff --git a/scripts/upgrade b/scripts/upgrade index de27cd2..8946e2f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,7 +20,6 @@ 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) port=$(ynh_app_setting_get --app=$app --key=port) -architecture=$(ynh_detect_arch) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) @@ -46,6 +45,11 @@ if ynh_legacy_permissions_exists; then ynh_app_setting_delete --app=$app --key=is_public fi +# Create a permission if needed +if ! ynh_permission_exists --permission="api"; then + ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --auth_header="false" --show_tile="false" --protected="true" +fi + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= @@ -92,21 +96,25 @@ then ynh_script_progression --message="Upgrading source files..." --weight=5 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" --source_id="front" + ynh_setup_source --dest_dir="$final_path" --source_id="front" --keep="/etc/vikunja/config.yml" + + mkdir -p "/opt/vikunja/files" + fi chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" -chmod +x /opt/vikunja/vikunja +chmod +x "/opt/vikunja/vikunja" +chown -R $app:www-data "/opt/vikunja/files" #================================================= # ADD A CONFIGURATION #================================================= -ynh_script_progression --message="Adding a configuration file..." --weight=1 +#ynh_script_progression --message="Adding a configuration file..." --weight=1 -redis_db=$(ynh_redis_get_free_db) -ynh_add_config --template="../conf/config.yml" --destination="/etc/vikunja/config.yml" +# redis_db=$(ynh_redis_get_free_db) +# ynh_add_config --template="../conf/config.yml" --destination="/etc/vikunja/config.yml" #chmod 600 "/etc/vikunja/config.yml"