1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lufi_ynh.git synced 2024-09-03 19:36:28 +02:00
* Add templates
This commit is contained in:
Éric Gaspar 2021-06-05 17:46:03 +02:00 committed by GitHub
parent c94205d7dd
commit b80a3b6062
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 139 additions and 183 deletions

View file

@ -1,6 +1,6 @@
--- ---
name: Bug report name: Bug report
about: Create a report to help us debug, it would be nice to fill the template as much as you can to help us, help you and help us all. about: When creating a bug report, please use the following template to provide all the relevant information and help debugging efficiently.
--- ---
@ -8,15 +8,17 @@ about: Create a report to help us debug, it would be nice to fill the template a
1. *Read this whole template first.* 1. *Read this whole template first.*
2. *Determine if you are on the right place:* 2. *Determine if you are on the right place:*
- *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!* - *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!*
- *Otherwise, the issue may be due to Lufi itself. Refer to its documentation or repository for help.* - *Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.*
- *If you have a doubt, post here, we will figure it out together.* - *When in doubt, post here and we will figure it out together.*
3. *Delete the italic comments as you write over them below, and remove this guide.* 3. *Delete the italic comments as you write over them below, and remove this guide.*
--- ---
**Describe the bug** ### Describe the bug
*A clear and concise description of what the bug is.* *A clear and concise description of what the bug is.*
**Versions** ### Context
- Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...* - Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...*
- YunoHost version: x.x.x - YunoHost version: x.x.x
- I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...* - I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...*
@ -25,11 +27,11 @@ about: Create a report to help us debug, it would be nice to fill the template a
- Using, or trying to install package version/branch: - Using, or trying to install package version/branch:
- If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`* - If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`*
**To Reproduce** ### Steps to reproduce
*Steps to reproduce the behavior.*
- *If you performed a command from the CLI, the command itself is enough. For example:* - *If you performed a command from the CLI, the command itself is enough. For example:*
```sh ```sh
sudo yunohost app install lufi sudo yunohost app install the_app
``` ```
- *If you used the webadmin, please perform the equivalent command from the CLI first.* - *If you used the webadmin, please perform the equivalent command from the CLI first.*
- *If the error occurs in your browser, explain what you did:* - *If the error occurs in your browser, explain what you did:*
@ -38,9 +40,16 @@ about: Create a report to help us debug, it would be nice to fill the template a
3. *Scroll down to '...'* 3. *Scroll down to '...'*
4. *See error* 4. *See error*
**Expected behavior** ### Expected behavior
*A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.* *A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.*
**Logs** ### Logs
*After a failed command, YunoHost makes the log available to you, but also to others, thanks to `yunohost log display [log name] --share`. The actual command, with the correct log name, is displayed at the end of the failed attempt in the CLI. Execute it and copy here the share link it outputs.*
*When an operation fails, YunoHost provides a simple way to share the logs.*
- *In the webadmin, the error message contains a link to the relevant log page. On that page, you will be able to 'Share with Yunopaste'. If you missed it, the logs of previous operations are also available under Tools > Logs.*
- *In command line, the command to share the logs is displayed at the end of the operation and looks like `yunohost log display [log name] --share`. If you missed it, you can find the log ID of a previous operation using `yunohost log list`.*
*After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)*
*If applicable and useful, add screenshots to help explain your problem.* *If applicable and useful, add screenshots to help explain your problem.*

16
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View file

@ -0,0 +1,16 @@
## Problem
- *Description of why you made this PR*
## Solution
- *And how do you fix that problem*
## PR Status
- [ ] Code finished and ready to be reviewed/tested
- [ ] The fix/enhancement were manually tested (if applicable)
## Automatic tests
Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ *after creating the PR*, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization)

View file

@ -1,3 +1,8 @@
<!--
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
It shall NOT be edited by hand.
-->
# Lufi for YunoHost # Lufi for YunoHost
[![Integration level](https://dash.yunohost.org/integration/lufi.svg)](https://dash.yunohost.org/appci/app/lufi) ![](https://ci-apps.yunohost.org/ci/badges/lufi.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/lufi.maintain.svg) [![Integration level](https://dash.yunohost.org/integration/lufi.svg)](https://dash.yunohost.org/appci/app/lufi) ![](https://ci-apps.yunohost.org/ci/badges/lufi.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/lufi.maintain.svg)
@ -9,51 +14,31 @@
If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
## Overview ## Overview
It stores files and allows you to download them.
Is that all? No. All the files are encrypted **by the browser**! It means that your files **never** leave your computer unencrypted. Self hosting files and sharing anonymous application
The administrator of the Lufi instance you use will not be able to see what is in your file, neither will your network administrator, or your ISP.
The encryption key part of the URL is a anchor (Cf. [Fragment Identifier](https://en.wikipedia.org/wiki/Fragment_identifier)), that means this part is only processed client-side and does not reach the server. :-) **Shipped version:** 0.05.13~ynh2
**Shipped version:** 0.05.13 **Demo:** https://demo.lufi.io/
## Screenshots ## Screenshots
![](https://framalibre.org/sites/default/files/screenshot_lufi_1.png) ![](./doc/screenshots/screenshot_lufi_1.png)
## Demo ## Disclaimers / important information
* [Official demo](https://demo.lufi.io/)
## Configuration ## Configuration
* How to configure this app: a plain file at `/var/www/lufi/lufi.conf` with SSH. * How to configure this app: a plain file at `/var/www/lufi/lufi.conf` with SSH.
## Documentation ## Documentation and resources
* Official documentation: https://framagit.org/luc/lufi/wikis/home * Official app website: https://example.com
* YunoHost documentation: https://yunohost.org/en/app_lufi * Official user documentation: https://yunohost.org/en/app_lufi
* Official admin documentation: https://framagit.org/luc/lufi/wikis/home
## YunoHost specific features * Upstream app code repository: https://framagit.org/fiat-tux/hat-softwares/lufi
* YunoHost documentation for this app: https://yunohost.org/app_lufi
#### Multi-user support * Report a bug: https://github.com/YunoHost-Apps/lufi_ynh/issues
Are LDAP and HTTP auth supported? **Yes**
Can the app be used by multiple users? **Yes**
#### Supported architectures
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/lufi%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/lufi/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/lufi%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/lufi/)
## Links
* Report a bug: https://github.com/YunoHost-Apps/lufi_ynh/issues
* Upstream app repository: https://framagit.org/fiat-tux/hat-softwares/lufi
* YunoHost website: https://yunohost.org/
---
## Developer info ## Developer info
@ -65,3 +50,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/lufi_ynh/tree/testing
or or
sudo yunohost app upgrade lufi -u https://github.com/YunoHost-Apps/lufi_ynh/tree/testing --debug sudo yunohost app upgrade lufi -u https://github.com/YunoHost-Apps/lufi_ynh/tree/testing --debug
``` ```
**More info regarding app packaging:** https://yunohost.org/packaging_apps

View file

@ -4,55 +4,37 @@
[![Installer Lufi avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lufi) [![Installer Lufi avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lufi)
*[Read this readme in english.](./README.md)* *[Read this readme in english.](./README.md)*
*[Lire ce readme en français.](./README_fr.md)*
> *Ce package vous permet d'installer Lufi rapidement et simplement sur un serveur YunoHost. > *Ce package vous permet d'installer Lufi rapidement et simplement sur un serveur YunoHost.
Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install) pour apprendre comment l'installer.* Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
## Vue d'ensemble ## Vue d'ensemble
Il stocke vos fichiers et vous permet de les télécharger.
Est-ce tout ? Non. Tous les fichiers sont chiffrés par le navigateur ! L'administrateur de l'instance Lufi ne pourra pas voir quel est votre administrateur réseau ou votre FAI. Application d'hébergement et de partage de fichiers anonyme
La clé de déchiffrement est une ancre (voir [Fragment Identifier](https://en.wikipedia.org/wiki/Fragment_identifier)), ce qui signifie que cette partie n'est traitée que par le client et n'atteint pas le serveur. :-) **Version incluse :** 0.05.13~ynh2
**Version incluse:** 0.05.13 **Démo :** https://demo.lufi.io/
## Captures d'écran ## Captures d'écran
![](https://framalibre.org/sites/default/files/screenshot_lufi_1.png) ![](./doc/screenshots/screenshot_lufi_1.png)
## Démo ## Avertissements / informations importantes
* [Démo officielle](https://demo.lufi.io/)
## Configuration ## Configuration
* Comment configurer cette application: un fichier brut `/var/www/lufi/lufi.conf` en SSH. * Comment configurer cette application: un fichier brut `/var/www/lufi/lufi.conf` en SSH.
## Documentation ## Documentations et ressources
* Documentation officielle : https://framagit.org/luc/lufi/wikis/home * Site officiel de l'app : https://example.com
* Documentation YunoHost : https://yunohost.org/fr/app_lufi * Documentation officielle utilisateur : https://yunohost.org/en/app_lufi
* Documentation officielle de l'admin : https://framagit.org/luc/lufi/wikis/home
## Caractéristiques spécifiques YunoHost * Dépôt de code officiel de l'app : https://framagit.org/fiat-tux/hat-softwares/lufi
* Documentation YunoHost pour cette app : https://yunohost.org/app_lufi
#### Support multi-utilisateur * Signaler un bug : https://github.com/YunoHost-Apps/lufi_ynh/issues
* L'authentification LDAP et HTTP est-elle prise en charge ? **Oui**
* L'application peut-elle être utilisée par plusieurs utilisateurs ? **Oui**
#### Architectures supportées
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/lufi%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/lufi/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/lufi%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/lufi/)
## Liens
* Signaler un bug : https://github.com/YunoHost-Apps/lufi_ynh/issues
* Dépôt de l'application principale : https://framagit.org/fiat-tux/hat-softwares/lufi
* Site web YunoHost : https://yunohost.org/
---
## Informations pour les développeurs ## Informations pour les développeurs
@ -64,3 +46,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/lufi_ynh/tree/testing
ou ou
sudo yunohost app upgrade lufi -u https://github.com/YunoHost-Apps/lufi_ynh/tree/testing --debug sudo yunohost app upgrade lufi -u https://github.com/YunoHost-Apps/lufi_ynh/tree/testing --debug
``` ```
**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps

View file

@ -1,11 +1,11 @@
;; Nom du test ;; Nom du test
auto_remove=1 auto_remove=1
; Manifest ; Manifest
domain="domain.tld" (DOMAIN) domain="domain.tld"
path="/path" (PATH) path="/path"
max_file_size=100 max_file_size=100
is_public=1 (PUBLIC|public=1|private=0) is_public=1
admin="john" (USER) admin="john"
; Checks ; Checks
pkg_linter=1 pkg_linter=1
setup_sub_dir=1 setup_sub_dir=1

3
doc/DISCLAIMER.md Normal file
View file

@ -0,0 +1,3 @@
## Configuration
* How to configure this app: a plain file at `/var/www/lufi/lufi.conf` with SSH.

3
doc/DISCLAIMER_fr.md Normal file
View file

@ -0,0 +1,3 @@
## Configuration
* Comment configurer cette application: un fichier brut `/var/www/lufi/lufi.conf` en SSH.

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View file

@ -6,15 +6,23 @@
"en": "Self hosting files and sharing anonymous application", "en": "Self hosting files and sharing anonymous application",
"fr": "Application d'hébergement et de partage de fichiers anonyme" "fr": "Application d'hébergement et de partage de fichiers anonyme"
}, },
"version": "0.05.13~ynh1", "version": "0.05.13~ynh2",
"url": "https://git.framasoft.org/luc/lufi", "url": "https://git.framasoft.org/luc/lufi",
"upstream": {
"license": "AGPL-3.0-or-later",
"website": "https://example.com",
"demo": "https://demo.lufi.io/",
"admindoc": "https://framagit.org/luc/lufi/wikis/home",
"userdoc": "https://yunohost.org/en/app_lufi",
"code": "https://framagit.org/fiat-tux/hat-softwares/lufi"
},
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"maintainer": { "maintainer": {
"name": "frju365, cyp", "name": "frju365, cyp",
"email": "win10@tutanota.com, cyp@rouquin.me" "email": "win10@tutanota.com, cyp@rouquin.me"
}, },
"requirements": { "requirements": {
"yunohost": ">= 4.1.7" "yunohost": ">= 4.2.0"
}, },
"multi_instance": true, "multi_instance": true,
"services": [ "services": [

View file

@ -1,16 +0,0 @@
## Problem
- *Description of why you made this PR*
## Solution
- *And how do you fix that problem*
## PR Status
- [ ] Code finished.
- [ ] Tested with Package_check.
- [ ] Fix or enhancement tested.
- [ ] Upgrade from last version tested.
- [ ] Can be reviewed and tested.
## Package_check results
---
* An automatic package_check will be launch at https://ci-apps-dev.yunohost.org/, when you add a specific comment to your Pull Request: "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!"*

View file

@ -141,10 +141,13 @@ else
fi fi
ynh_store_file_checksum --file="$config" ynh_store_file_checksum --file="$config"
chmod 600 $final_path/lufi.conf
chown $app:$app $final_path/lufi.conf
#================================================= #=================================================
# UPDATE SSOWAT # UPDATE SSOWAT
#================================================= #=================================================
ynh_script_progression --message="Reconfigure SSOwat" ynh_script_progression --message="Reconfiguring permissions..."
ynh_permission_update --permission="main" --add="visitors" ynh_permission_update --permission="main" --add="visitors"

View file

@ -76,6 +76,14 @@ ynh_script_progression --message="Installing dependencies..."
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Configuring system user..."
# Create a system user
ynh_system_user_create --username=$app
#================================================= #=================================================
# CREATE A POSTGRESQL DATABASE # CREATE A POSTGRESQL DATABASE
#================================================= #=================================================
@ -106,14 +114,6 @@ ynh_script_progression --message="Configuring NGINX web server..."
# Create a dedicated NGINX config # Create a dedicated NGINX config
ynh_add_nginx_config max_file_size ynh_add_nginx_config max_file_size
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Configuring system user..."
# Create a system user
ynh_system_user_create --username=$app
#================================================= #=================================================
# SPECIFIC SETUP # SPECIFIC SETUP
#================================================= #=================================================
@ -144,6 +144,9 @@ fi
ynh_store_file_checksum --file="$config" ynh_store_file_checksum --file="$config"
chmod 600 $final_path/lufi.conf
chown $app:$app $final_path/lufi.conf
#================================================= #=================================================
# INSTALL LUFI # INSTALL LUFI
#================================================= #=================================================
@ -158,9 +161,6 @@ popd
#================================================= #=================================================
ynh_script_progression --message="Setuping a cron..." ynh_script_progression --message="Setuping a cron..."
# cp ../conf/cron_lufi /etc/cron.d/$app
# ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path/" --target_file="/etc/cron.d/$app"
# ynh_replace_string --match_string="__USER__" --replace_string="$app" --target_file="/etc/cron.d/$app"
ynh_add_config --template="../conf/cron_lufi" --destination="/etc/cron.d/$app" ynh_add_config --template="../conf/cron_lufi" --destination="/etc/cron.d/$app"
chmod +x $final_path/script/lufi chmod +x $final_path/script/lufi

View file

@ -83,16 +83,6 @@ ynh_script_progression --message="Removing logrotate configuration..."
# Remove the app-specific logrotate config # Remove the app-specific logrotate config
ynh_remove_logrotate ynh_remove_logrotate
#=================================================
# CLOSE A PORT
#=================================================
if yunohost firewall list | grep -q "\- $port$"
then
ynh_script_progression --message="Closing port $port..."
ynh_exec_warn_less yunohost firewall disallow TCP $port
fi
#================================================= #=================================================
# SPECIFIC REMOVE # SPECIFIC REMOVE
#================================================= #=================================================

View file

@ -53,13 +53,6 @@ ynh_script_progression --message="Restoring NGINX configuration..."
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
ynh_script_progression --message="Restoring the app main directory..."
ynh_restore_file --origin_path="$final_path"
#================================================= #=================================================
# RECREATE THE DEDICATED USER # RECREATE THE DEDICATED USER
#================================================= #=================================================
@ -68,6 +61,13 @@ ynh_script_progression --message="Recreating the dedicated system user..."
# Create the dedicated user (if not existing) # Create the dedicated user (if not existing)
ynh_system_user_create --username=$app ynh_system_user_create --username=$app
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
ynh_script_progression --message="Restoring the app main directory..."
ynh_restore_file --origin_path="$final_path"
#================================================= #=================================================
# RESTORE USER RIGHTS # RESTORE USER RIGHTS
#================================================= #=================================================

View file

@ -39,19 +39,18 @@ upgrade_type=$(ynh_check_app_version_changed)
#================================================= #=================================================
ynh_script_progression --message="Ensuring downward compatibility..." ynh_script_progression --message="Ensuring downward compatibility..."
# If db_name doesn't exist, create it
if [ -z "$db_name" ]; then
db_name=$(ynh_sanitize_dbid --db_name=$app)
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
fi
# If final_path doesn't exist, create it # If final_path doesn't exist, create it
if [ -z "$final_path" ]; then if [ -z "$final_path" ]; then
final_path=/var/www/$app final_path=/var/www/$app
ynh_app_setting_set --app=$app --key=final_path --value=$final_path ynh_app_setting_set --app=$app --key=final_path --value=$final_path
fi fi
if [ -z "$db_pwd" ]; then
# Need to install new dependencies before creating the new database
need_migration_from_sqlite_to_psql=1
else
need_migration_from_sqlite_to_psql=0
fi
if [ -z "$max_file_size" ]; then if [ -z "$max_file_size" ]; then
max_file_size=100 # 100 Mo max_file_size=100 # 100 Mo
ynh_app_setting_set --app=$app --key=max_file_size --value=$max_file_size ynh_app_setting_set --app=$app --key=max_file_size --value=$max_file_size
@ -86,7 +85,15 @@ ynh_abort_if_errors
#================================================= #=================================================
ynh_script_progression --message="Stopping a systemd service..." ynh_script_progression --message="Stopping a systemd service..."
ynh_systemd_action --service_name=$app --action="stop" --log_path="$final_path/log/production.log" ynh_systemd_action --service_name=$app --action=stop --log_path="$final_path/log/production.log"
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Making sure dedicated system user exists..."
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
@ -115,36 +122,10 @@ ynh_script_progression --message="Upgrading dependencies..."
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Making sure dedicated system user exists..."
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app
#=================================================
# SPECIFIC UPGRADE
#=================================================
# CREATE A POSTGRESQL DATABASE IF NEEDED
#=================================================
if [ $need_migration_from_sqlite_to_psql -eq 1 ]; then
ynh_print_info --message="Creating a PostgreSQL database..."
# Create postgresql database
ynh_psql_test_if_first_run
db_name=$(ynh_sanitize_dbid --db_name=$app)
db_user=$db_name
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
# Initialize database and store postgres password for upgrade
ynh_psql_setup_db --db_user=$db_user --db_name=$db_name
db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) # Password created in ynh_psql_setup_db function
fi
#================================================= #=================================================
# SETUP LUFI # SETUP LUFI
#================================================= #=================================================
ynh_script_progression --message="Configuring lufi..." ynh_script_progression --message="Configuring Lufi..."
config=${final_path}/lufi.conf config=${final_path}/lufi.conf
ynh_backup_if_checksum_is_different --file="$config" ynh_backup_if_checksum_is_different --file="$config"
@ -170,28 +151,16 @@ fi
ynh_store_file_checksum --file="$config" ynh_store_file_checksum --file="$config"
chmod 600 $final_path/lufi.conf
chown $app:$app $final_path/lufi.conf
#================================================= #=================================================
# BUILD LUFI # BUILD LUFI
#================================================= #=================================================
ynh_script_progression --message="Building Lufi..." ynh_script_progression --message="Building Lufi..."
pushd $final_path pushd $final_path
# Migrate from SQLite to PostgreSQL carton install --deployment --without=sqlite --without=mysql --without=htpasswd --without=test
if [ $need_migration_from_sqlite_to_psql -eq 1 ]; then
# Preinstall with sqlite
carton install --deployment --without=mysql --without=htpasswd --without=test
# if /var/log/$app/production.log is a symbolic link, then move it to $final_path/log/production.log
if [ ! -L "/var/log/$app/production.log" ]
then
mv "/var/log/$app/production.log" "$final_path/log/production.log"
chown -R $app: "$final_path/log/production.log"
fi
carton exec script/lufi sqliteToOtherDB
fi
carton install --deployment --without=sqlite --without=mysql --without=htpasswd --without=test
popd popd
#================================================= #=================================================
@ -233,12 +202,12 @@ ynh_add_systemd_config
ynh_script_progression --message="Securing files and directories..." ynh_script_progression --message="Securing files and directories..."
# Set permissions on app files # Set permissions on app files
chown -R $app: $final_path chown -R $app:$app $final_path
#================================================= #=================================================
# SETUP SSOWAT # SETUP SSOWAT
#================================================= #=================================================
ynh_script_progression --message="Upgrading SSOwat configuration..." ynh_script_progression --message="Upgrading permissions..."
ynh_permission_update --permission="main" --add="visitors" ynh_permission_update --permission="main" --add="visitors"