mirror of
https://github.com/YunoHost-Apps/vikunja_ynh.git
synced 2024-09-03 18:06:26 +02:00
commit
ddd035dcef
14 changed files with 109 additions and 47 deletions
13
README.md
13
README.md
|
@ -15,9 +15,18 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
|||
|
||||
## Overview
|
||||
|
||||
Self-hosted To-Do list application
|
||||
Vikunja is a self-hosted open-source to-do list application for all platforms.
|
||||
|
||||
**Shipped version:** 0.18.1~ynh3
|
||||
### Features
|
||||
|
||||
- Stay organized
|
||||
- Collaborate with peers
|
||||
- Tasks
|
||||
- Kanban board
|
||||
- CalDAV
|
||||
- Links
|
||||
|
||||
**Shipped version:** 0.18.2~ynh1
|
||||
|
||||
**Demo:** https://try.vikunja.io/login
|
||||
|
||||
|
|
11
README_fr.md
11
README_fr.md
|
@ -13,7 +13,16 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
|
|||
|
||||
Vikunja est une application de liste de tâches Open Source auto-hébergée pour toutes les plateformes.
|
||||
|
||||
**Version incluse :** 0.18.1~ynh3
|
||||
### Features
|
||||
|
||||
- Stay organized
|
||||
- Collaborate with peers
|
||||
- Tasks
|
||||
- Kanban board
|
||||
- CalDAV
|
||||
- Links
|
||||
|
||||
**Version incluse :** 0.18.2~ynh1
|
||||
|
||||
**Démo :** https://try.vikunja.io/login
|
||||
|
||||
|
|
|
@ -16,11 +16,11 @@ service:
|
|||
# Enable the caldav endpoint, see the docs for more details
|
||||
enablecaldav: true
|
||||
# Set the motd message, available from the /info endpoint
|
||||
motd: ""
|
||||
motd: __SET_MOTD__
|
||||
# Enable sharing of lists via a link
|
||||
enablelinksharing: true
|
||||
# Whether to let new users registering themselves or not
|
||||
enableregistration: true
|
||||
enableregistration: __ENABLE_REGISTRATION__
|
||||
# Whether to enable task attachments or not
|
||||
enabletaskattachments: true
|
||||
# The time zone all timestamps are in. Please note that time zones have to use [the official tz database names](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). UTC or GMT offsets won't work.
|
||||
|
|
|
@ -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
|
23
config_panel.toml
Normal file
23
config_panel.toml
Normal file
|
@ -0,0 +1,23 @@
|
|||
version = "1.0"
|
||||
|
||||
[main]
|
||||
name = "Vikunja configuration"
|
||||
services = ["__APP__"]
|
||||
|
||||
[main.config]
|
||||
name = "Configuration Options"
|
||||
|
||||
[main.config.set_motd]
|
||||
ask = "Set MOTD"
|
||||
type = "string"
|
||||
help = "Set the MOTD message shown in Vikunja login page"
|
||||
bind = "motd:/etc/vikunja/config.yml"
|
||||
|
||||
[main.config.enable_registration]
|
||||
ask = "Enable registration"
|
||||
type = "boolean"
|
||||
yes = "true"
|
||||
no = "false"
|
||||
help = "Whether to let new users registering themselves or not"
|
||||
bind = "enableregistration:/etc/vikunja/config.yml"
|
||||
|
10
doc/DESCRIPTION.md
Normal file
10
doc/DESCRIPTION.md
Normal file
|
@ -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
|
|
@ -1 +1,10 @@
|
|||
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
|
|
@ -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.2~ynh1",
|
||||
"url": "https://vikunja.io/",
|
||||
"upstream": {
|
||||
"license": "GPL-3.0",
|
||||
|
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
|
@ -35,6 +35,9 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
|
|||
secret=$(ynh_string_random --length=32)
|
||||
timezone="$(cat /etc/timezone)"
|
||||
|
||||
set_motd=$(ynh_app_setting_get --app=$app --key=set_motd)
|
||||
enable_registration=$(ynh_app_setting_get --app=$app --key=enable_registration)
|
||||
|
||||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
|
|
|
@ -24,11 +24,13 @@ 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
|
||||
|
||||
set_motd=""
|
||||
enable_registration="true"
|
||||
|
||||
#=================================================
|
||||
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
||||
#=================================================
|
||||
|
@ -38,7 +40,6 @@ final_path=/var/www/$app
|
|||
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
|
||||
|
||||
mkdir -p "/etc/vikunja"
|
||||
#touch "/etc/vikunja/config.yml"
|
||||
|
||||
# Register (book) web path
|
||||
ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
|
||||
|
@ -50,6 +51,8 @@ ynh_script_progression --message="Storing installation settings..." --weight=2
|
|||
|
||||
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
||||
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
||||
ynh_app_setting_set --app=$app --key=set_motd --value=$set_motd
|
||||
ynh_app_setting_set --app=$app --key=enable_registration --value=$enable_registration
|
||||
|
||||
#=================================================
|
||||
# STANDARD MODIFICATIONS
|
||||
|
@ -108,7 +111,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
|
||||
|
@ -125,8 +132,8 @@ 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"
|
||||
|
||||
#chmod 600 "/etc/vikunja/config.yml"
|
||||
chmod 400 "/etc/vikunja/config.yml"
|
||||
chown $app:$app "/etc/vikunja/config.yml"
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -20,17 +20,18 @@ 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)
|
||||
timezone="$(cat /etc/timezone)"
|
||||
secret=$(ynh_string_random --length=32)
|
||||
|
||||
set_motd=$(ynh_app_setting_get --app=$app --key=set_motd)
|
||||
enable_registration=$(ynh_app_setting_get --app=$app --key=enable_registration)
|
||||
|
||||
#=================================================
|
||||
# CHECK VERSION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Checking version..."
|
||||
|
||||
upgrade_type=$(ynh_check_app_version_changed)
|
||||
|
||||
|
@ -39,6 +40,16 @@ upgrade_type=$(ynh_check_app_version_changed)
|
|||
#=================================================
|
||||
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
||||
|
||||
if [ -z "$set_motd" ]; then
|
||||
set_motd=""
|
||||
ynh_app_setting_set --app=$app --key=set_motd --value=$set_motd
|
||||
fi
|
||||
|
||||
if [ -z "$enable_registration" ]; then
|
||||
enable_registration="true"
|
||||
ynh_app_setting_set --app=$app --key=enable_registration --value=$enable_registration
|
||||
fi
|
||||
|
||||
# Cleaning legacy permissions
|
||||
if ynh_legacy_permissions_exists; then
|
||||
ynh_legacy_permissions_delete_all
|
||||
|
@ -46,6 +57,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
|
||||
#=================================================
|
||||
|
@ -93,17 +109,21 @@ then
|
|||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
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"
|
||||
|
|
Loading…
Reference in a new issue