diff --git a/conf/systemd.service b/conf/systemd.service index 8f38aa5..adf2e25 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,8 +7,8 @@ Requires=postgresql.service redis.service Type=simple User=__APP__ Group=__APP__ -WorkingDirectory=/opt/vikunja -ExecStart=/opt/vikunja/vikunja +WorkingDirectory=/opt/__APP__ +ExecStart=/opt/__APP__/vikunja RestartSec=2s Restart=always diff --git a/manifest.json b/manifest.json index 17e107d..b0d1b4c 100644 --- a/manifest.json +++ b/manifest.json @@ -22,7 +22,7 @@ "requirements": { "yunohost": ">= 4.3.0" }, - "multi_instance": false, + "multi_instance": true, "services": [ "nginx" ], diff --git a/scripts/backup b/scripts/backup index f876c34..146898e 100644 --- a/scripts/backup +++ b/scripts/backup @@ -40,10 +40,10 @@ ynh_print_info --message="Declaring files to be backed up..." ynh_backup --src_path="$final_path" # Config -ynh_backup --src_path="/etc/vikunja/config.yml" +ynh_backup --src_path="/etc/$app/config.yml" # Backend -ynh_backup --src_path="/opt/vikunja" +ynh_backup --src_path="/opt/$app" #================================================= # BACKUP THE NGINX CONFIGURATION diff --git a/scripts/change_url b/scripts/change_url index 094fe89..4fefeca 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -117,9 +117,9 @@ ynh_script_progression --message="Adding a configuration file..." --weight=1 domain="$new_domain" path="$new_path" redis_db=$(ynh_redis_get_free_db) -ynh_add_config --template="../conf/config.yml" --destination="/etc/vikunja/config.yml" +ynh_add_config --template="../conf/config.yml" --destination="/etc/$app/config.yml" -chmod 600 "/etc/vikunja/config.yml" +chmod 600 "/etc/$app/config.yml" #================================================= # GENERIC FINALISATION diff --git a/scripts/remove b/scripts/remove index 23189e4..049da87 100644 --- a/scripts/remove +++ b/scripts/remove @@ -98,7 +98,7 @@ ynh_system_user_delete --username=$app ynh_script_progression --message="Removing backend..." --weight=1 # Delete /opt/vikunja -ynh_secure_remove --file="/opt/vikunja" +ynh_secure_remove --file="/opt/$app" #================================================= # END OF SCRIPT diff --git a/scripts/restore b/scripts/restore index 90f666b..5c14c96 100644 --- a/scripts/restore +++ b/scripts/restore @@ -66,12 +66,12 @@ chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" # Config -ynh_restore_file --origin_path="/etc/vikunja/config.yml" +ynh_restore_file --origin_path="/etc/$app/config.yml" # Backend -ynh_restore_file --origin_path="/opt/vikunja" -chmod +x "/opt/vikunja/vikunja" -chown -R $app:www-data "/opt/vikunja/files" +ynh_restore_file --origin_path="/opt/$app" +chmod +x "/opt/$app/vikunja" +chown -R $app:www-data "/opt/$app/files" #================================================= # REINSTALL DEPENDENCIES