mirror of
https://github.com/YunoHost-Apps/vikunja_ynh.git
synced 2024-09-03 18:06:26 +02:00
Fix
This commit is contained in:
parent
6c28659239
commit
02a9be2b2e
4 changed files with 10 additions and 35 deletions
|
@ -10,7 +10,7 @@ service:
|
||||||
# The base path on the file system where the binary and assets are.
|
# The base path on the file system where the binary and assets are.
|
||||||
# Vikunja will also look in this path for a config file, so you could provide only this variable to point to a folder
|
# Vikunja will also look in this path for a config file, so you could provide only this variable to point to a folder
|
||||||
# with a config file which will then be used.
|
# with a config file which will then be used.
|
||||||
rootpath: "/opt/vikunja/"
|
rootpath: "__FINALPATH__"
|
||||||
# The max number of items which can be returned per page
|
# The max number of items which can be returned per page
|
||||||
maxitemsperpage: 50
|
maxitemsperpage: 50
|
||||||
# Enable the caldav endpoint, see the docs for more details
|
# Enable the caldav endpoint, see the docs for more details
|
||||||
|
|
|
@ -7,8 +7,8 @@ Requires=postgresql.service redis.service
|
||||||
Type=simple
|
Type=simple
|
||||||
User=__APP__
|
User=__APP__
|
||||||
Group=__APP__
|
Group=__APP__
|
||||||
WorkingDirectory=/opt/vikunja
|
WorkingDirectory=__FINALPATH__/
|
||||||
ExecStart=/opt/vikunja/vikunja
|
ExecStart=__FINALPATH__/vikunja
|
||||||
RestartSec=2s
|
RestartSec=2s
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
||||||
|
|
|
@ -99,23 +99,14 @@ ynh_script_progression --message="Setting up source files..." --weight=1
|
||||||
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# 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"
|
||||||
|
ynh_setup_source --dest_dir="$final_path" --source_id="$architecture"
|
||||||
|
|
||||||
|
mkdir -p "$final_path/files"
|
||||||
|
|
||||||
chmod 750 "$final_path"
|
chmod 750 "$final_path"
|
||||||
chmod -R o-rwx "$final_path"
|
chmod -R o-rwx "$final_path"
|
||||||
chown -R $app:www-data "$final_path"
|
chown -R $app:www-data "$final_path"
|
||||||
|
chmod +x "$final_path/vikunja"
|
||||||
#=================================================
|
|
||||||
# INSTALL BACKEND
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Installing backend..." --weight=15
|
|
||||||
|
|
||||||
mkdir -p "/opt/vikunja"
|
|
||||||
mkdir -p "/opt/vikunja/files"
|
|
||||||
|
|
||||||
ynh_setup_source --dest_dir="/opt/vikunja" --source_id="$architecture"
|
|
||||||
|
|
||||||
chmod +x "/opt/vikunja/vikunja"
|
|
||||||
chown -R $app:www-data "/opt/vikunja/files"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
|
|
|
@ -99,17 +99,11 @@ ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||||
|
|
||||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Installing backend..." --weight=5
|
|
||||||
|
|
||||||
tempdir="$(mktemp -d)"
|
|
||||||
ynh_setup_source --dest_dir=$tempdir --source_id=api
|
|
||||||
ynh_exec_warn_less N | dpkg -i $tempdir/vikunja-unstable-amd64.deb
|
|
||||||
|
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=5
|
ynh_script_progression --message="Upgrading source files..." --weight=5
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# 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"
|
ynh_setup_source --dest_dir="$final_path" --source_id="front" --keep="/etc/vikunja/config.yml"
|
||||||
|
ynh_setup_source --dest_dir="$final_path" --source_id="$architecture"
|
||||||
mkdir -p "/opt/vikunja/files"
|
mkdir -p "/opt/vikunja/files"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
@ -117,18 +111,8 @@ fi
|
||||||
chmod 750 "$final_path"
|
chmod 750 "$final_path"
|
||||||
chmod -R o-rwx "$final_path"
|
chmod -R o-rwx "$final_path"
|
||||||
chown -R $app:www-data "$final_path"
|
chown -R $app:www-data "$final_path"
|
||||||
chmod +x "/opt/vikunja/vikunja"
|
chmod +x "$final_path/vikunja"
|
||||||
chown -R $app:www-data "/opt/vikunja/files"
|
chown -R $app:www-data "$final_path/files"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# ADD A CONFIGURATION
|
|
||||||
#=================================================
|
|
||||||
#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"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
|
|
Loading…
Reference in a new issue