1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/vaultwarden_ynh.git synced 2024-09-03 18:26:31 +02:00

Name change

This commit is contained in:
yalh76 2021-04-30 13:49:31 +02:00
parent fa8d0b9190
commit da1e8912f8
12 changed files with 90 additions and 83 deletions

View file

@ -1,37 +1,37 @@
# Bitwarden for YunoHost # vaultwarden for YunoHost
[![Integration level](https://dash.yunohost.org/integration/bitwarden.svg)](https://dash.yunohost.org/appci/app/bitwarden) ![](https://ci-apps.yunohost.org/ci/badges/bitwarden.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/bitwarden.maintain.svg) [![Integration level](https://dash.yunohost.org/integration/vaultwarden.svg)](https://dash.yunohost.org/appci/app/vaultwarden) ![](https://ci-apps.yunohost.org/ci/badges/vaultwarden.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/vaultwarden.maintain.svg)
[![Install Bitwarden with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=bitwarden) [![Install vaultwarden with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=vaultwarden)
*[Lire ce readme en français.](./README_fr.md)* *[Lire ce readme en français.](./README_fr.md)*
> *This package allows you to install Bitwarden quickly and simply on a YunoHost server. > *This package allows you to install vaultwarden quickly and simply on a YunoHost server.
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
Bitwarden is a open source password manager. vaultwarden is a open source password manager.
**Shipped version:** 1.21.0 **Shipped version:** 1.21.0
## Important points to read before installing ## Important points to read before installing
At the end of the installation, the admin user will receive a mail with the admin_token used to access https://your.domain.tld/bitwarden/admin. At the end of the installation, the admin user will receive a mail with the admin_token used to access https://your.domain.tld/vaultwarden/admin.
## Screenshots ## Screenshots
![](https://bitwarden.com/images/hero.png) ![](https://vaultwarden.com/images/hero.png)
## Demo ## Demo
* [Official demo](https://vault.bitwarden.com/#/register) * [Official demo](https://vault.vaultwarden.com/#/register)
## Configuration ## Configuration
How to configure this app: by an admin panel at https://bitwarden.domain.tld/admin. How to configure this app: by an admin panel at https://vaultwarden.domain.tld/admin.
## Documentation ## Documentation
* Official documentation: https://help.bitwarden.com/ and https://github.com/dani-garcia/bitwarden_rs/wiki * Official documentation: https://help.vaultwarden.com/ and https://github.com/dani-garcia/vaultwarden/wiki
## YunoHost specific features ## YunoHost specific features
@ -42,25 +42,25 @@ How to configure this app: by an admin panel at https://bitwarden.domain.tld/adm
#### Supported architectures #### Supported architectures
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/bitwarden.svg)](https://ci-apps.yunohost.org/ci/apps/bitwarden/) * x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/vaultwarden.svg)](https://ci-apps.yunohost.org/ci/apps/vaultwarden/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/bitwarden.svg)](https://ci-apps-arm.yunohost.org/ci/apps/bitwarden/) * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/vaultwarden.svg)](https://ci-apps-arm.yunohost.org/ci/apps/vaultwarden/)
## Links ## Links
* Report a bug: https://github.com/YunoHost-Apps/bitwarden_ynh/issues * Report a bug: https://github.com/YunoHost-Apps/vaultwarden_ynh/issues
* App website: https://bitwarden.com/ * App website: https://vaultwarden.com/
* Upstream app repository: https://github.com/dani-garcia/bitwarden_rs * Upstream app repository: https://github.com/dani-garcia/vaultwarden
* YunoHost website: https://yunohost.org/ * YunoHost website: https://yunohost.org/
--- ---
## Developer info ## Developer info
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/bitwarden_ynh/tree/testing). Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/vaultwarden_ynh/tree/testing).
To try the testing branch, please proceed like that. To try the testing branch, please proceed like that.
``` ```
sudo yunohost app install https://github.com/YunoHost-Apps/bitwarden_ynh/tree/testing --debug sudo yunohost app install https://github.com/YunoHost-Apps/vaultwarden_ynh/tree/testing --debug
or or
sudo yunohost app upgrade bitwarden -u https://github.com/YunoHost-Apps/bitwarden_ynh/tree/testing --debug sudo yunohost app upgrade vaultwarden -u https://github.com/YunoHost-Apps/vaultwarden_ynh/tree/testing --debug
``` ```

View file

@ -1,37 +1,37 @@
# Bitwarden pour YunoHost # vaultwarden pour YunoHost
[![Niveau d'intégration](https://dash.yunohost.org/integration/bitwarden.svg)](https://dash.yunohost.org/appci/app/bitwarden) ![](https://ci-apps.yunohost.org/ci/badges/bitwarden.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/bitwarden.maintain.svg) [![Niveau d'intégration](https://dash.yunohost.org/integration/vaultwarden.svg)](https://dash.yunohost.org/appci/app/vaultwarden) ![](https://ci-apps.yunohost.org/ci/badges/vaultwarden.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/vaultwarden.maintain.svg)
[![Installer Bitwarden avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=bitwarden) [![Installer vaultwarden avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=vaultwarden)
*[Read this readme in english.](./README.md)* *[Read this readme in english.](./README.md)*
> *Ce package vous permet d'installer Bitwarden rapidement et simplement sur un serveur YunoHost. > *Ce package vous permet d'installer vaultwarden 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, consultez [le guide](https://yunohost.org/#/install) pour apprendre comment l'installer.*
## Vue d'ensemble ## Vue d'ensemble
Bitwarden est un gestionnaire de mots de passe open source. vaultwarden est un gestionnaire de mots de passe open source.
**Version incluse :** 1.21.0 **Version incluse :** 1.21.0
## Points importants à lire avant l'installation ## Points importants à lire avant l'installation
Après l'installation, l'utilisateur admin recevra un e-mail avec le admin_token à utiliser pour accéder à l'administration de Bitwarden https://your.domain.tld/bitwarden/admin. Après l'installation, l'utilisateur admin recevra un e-mail avec le admin_token à utiliser pour accéder à l'administration de vaultwarden https://your.domain.tld/vaultwarden/admin.
## Captures d'écran ## Captures d'écran
![](https://bitwarden.com/images/hero.png) ![](https://vaultwarden.com/images/hero.png)
## Démo ## Démo
* [Démo officielle](https://vault.bitwarden.com/#/register) * [Démo officielle](https://vault.vaultwarden.com/#/register)
## Configuration ## Configuration
Comment configurer cette application : via le panneau d'administration https://bitwarden.domain.tld/admin. Comment configurer cette application : via le panneau d'administration https://vaultwarden.domain.tld/admin.
## Documentation ## Documentation
* Documentation officielle : https://help.bitwarden.com/ et https://github.com/dani-garcia/bitwarden_rs/wiki * Documentation officielle : https://help.vaultwarden.com/ et https://github.com/dani-garcia/vaultwarden/wiki
## Caractéristiques spécifiques YunoHost ## Caractéristiques spécifiques YunoHost
@ -42,25 +42,25 @@ Comment configurer cette application : via le panneau d'administration https://b
#### Architectures supportées #### Architectures supportées
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/bitwarden.svg)](https://ci-apps.yunohost.org/ci/apps/bitwarden/) * x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/vaultwarden.svg)](https://ci-apps.yunohost.org/ci/apps/vaultwarden/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/bitwarden.svg)](https://ci-apps-arm.yunohost.org/ci/apps/bitwarden/) * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/vaultwarden.svg)](https://ci-apps-arm.yunohost.org/ci/apps/vaultwarden/)
## Liens ## Liens
* Signaler un bug : https://github.com/YunoHost-Apps/bitwarden_ynh/issues * Signaler un bug : https://github.com/YunoHost-Apps/vaultwarden_ynh/issues
* Site de l'application : https://bitwarden.com/ * Site de l'application : https://vaultwarden.com/
* Dépôt de l'application principale : https://github.com/dani-garcia/bitwarden_rs * Dépôt de l'application principale : https://github.com/dani-garcia/vaultwarden
* Site web YunoHost : https://yunohost.org/ * Site web YunoHost : https://yunohost.org/
--- ---
## Informations pour les développeurs ## Informations pour les développeurs
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/bitwarden_ynh/tree/testing). Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/vaultwarden_ynh/tree/testing).
Pour essayer la branche testing, procédez comme suit. Pour essayer la branche testing, procédez comme suit.
``` ```
sudo yunohost app install https://github.com/YunoHost-Apps/bitwarden_ynh/tree/testing --debug sudo yunohost app install https://github.com/YunoHost-Apps/vaultwarden_ynh/tree/testing --debug
ou ou
sudo yunohost app upgrade bitwarden -u https://github.com/YunoHost-Apps/bitwarden_ynh/tree/testing --debug sudo yunohost app upgrade vaultwarden -u https://github.com/YunoHost-Apps/vaultwarden_ynh/tree/testing --debug
``` ```

View file

@ -1,4 +1,4 @@
SOURCE_URL=https://github.com/dani-garcia/bitwarden_rs/archive/1.21.0.tar.gz SOURCE_URL=https://github.com/dani-garcia/vaultwarden/archive/1.21.0.tar.gz
SOURCE_SUM=ba7e6600f3f05d9e06706e348a287b144ed34eac595b895567e64aebf551f3b852a4601ae62d8d84813154a9917011e53db44c61b49d46436afef4a740fc397f SOURCE_SUM=ba7e6600f3f05d9e06706e348a287b144ed34eac595b895567e64aebf551f3b852a4601ae62d8d84813154a9917011e53db44c61b49d46436afef4a740fc397f
SOURCE_SUM_PRG=sha512sum SOURCE_SUM_PRG=sha512sum
SOURCE_FORMAT=tar.gz SOURCE_FORMAT=tar.gz

View file

@ -1,5 +1,5 @@
Bitwarden was successfully installed :) vaultwarden was successfully installed :)
Please open https://__DOMAIN____PATH_URL__/admin Please open https://__DOMAIN____PATH_URL__/admin
The admin token is: __ADMIN_TOKEN__ The admin token is: __ADMIN_TOKEN__
You will be able to invite users to your bitwarden instance. You will be able to invite users to your vaultwarden instance.
If you facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/bitwarden_ynh If you facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/vaultwarden_ynh

View file

@ -1,20 +1,20 @@
[Unit] [Unit]
Description=Bitwarden Server (Rust Edition) Description=vaultwarden Server (Rust Edition)
Documentation=https://github.com/dani-garcia/bitwarden_rs Documentation=https://github.com/dani-garcia/vaultwarden
After=network.target After=network.target
[Service] [Service]
# The user/group bitwarden_rs is run under. the working directory (see below) should allow write and read access to this user/group # The user/group vaultwarden is run under. the working directory (see below) should allow write and read access to this user/group
User=__APP__ User=__APP__
Group=__APP__ Group=__APP__
# The location of the .env file for configuration # The location of the .env file for configuration
EnvironmentFile=__FINALPATH__/live/bitwarden_rs.env EnvironmentFile=__FINALPATH__/live/vaultwarden.env
# The location of the compiled binary # The location of the compiled binary
ExecStart=__FINALPATH__/live/bitwarden_rs ExecStart=__FINALPATH__/live/vaultwarden
# Set reasonable connection and process limits # Set reasonable connection and process limits
LimitNOFILE=1048576 LimitNOFILE=1048576
LimitNPROC=64 LimitNPROC=64
# Isolate bitwarden_rs from the rest of the system # Isolate vaultwarden from the rest of the system
PrivateTmp=true PrivateTmp=true
PrivateDevices=true PrivateDevices=true
ProtectHome=true ProtectHome=true

View file

@ -1,4 +1,4 @@
## Bitwarden_RS Configuration File ## vaultwarden Configuration File
## Uncomment any of the following lines to change the defaults ## Uncomment any of the following lines to change the defaults
## ##
## Be aware that most of these settings will be overridden if they were changed ## Be aware that most of these settings will be overridden if they were changed
@ -82,7 +82,7 @@ LOG_FILE=/var/log/__APP__/__APP__.log
## Enable WAL for the DB ## Enable WAL for the DB
## Set to false to avoid enabling WAL during startup. ## Set to false to avoid enabling WAL during startup.
## Note that if the DB already has WAL enabled, you will also need to disable WAL in the DB, ## Note that if the DB already has WAL enabled, you will also need to disable WAL in the DB,
## this setting only prevents bitwarden_rs from automatically enabling it on start. ## this setting only prevents vaultwarden from automatically enabling it on start.
## Please read project wiki page about this setting first before changing the value as it can ## Please read project wiki page about this setting first before changing the value as it can
## cause performance degradation or might render the service unable to start. ## cause performance degradation or might render the service unable to start.
# ENABLE_DB_WAL=true # ENABLE_DB_WAL=true
@ -126,7 +126,7 @@ LOG_FILE=/var/log/__APP__/__APP__.log
## Email token size ## Email token size
## Number of digits in an email token (min: 6, max: 19). ## Number of digits in an email token (min: 6, max: 19).
## Note that the Bitwarden clients are hardcoded to mention 6 digit codes regardless of this setting! ## Note that the vaultwarden clients are hardcoded to mention 6 digit codes regardless of this setting!
# EMAIL_TOKEN_SIZE=6 # EMAIL_TOKEN_SIZE=6
## Controls if new users can register ## Controls if new users can register
@ -170,7 +170,7 @@ ADMIN_TOKEN=__ADMIN_TOKEN__
## Invitations org admins to invite users, even when signups are disabled ## Invitations org admins to invite users, even when signups are disabled
# INVITATIONS_ALLOWED=true # INVITATIONS_ALLOWED=true
## Name shown in the invitation emails that don't come from a specific organization ## Name shown in the invitation emails that don't come from a specific organization
# INVITATION_ORG_NAME=Bitwarden_RS # INVITATION_ORG_NAME=vaultwarden
## Per-organization attachment limit (KB) ## Per-organization attachment limit (KB)
## Limit in kilobytes for an organization attachments, once the limit is exceeded it won't be possible to upload more ## Limit in kilobytes for an organization attachments, once the limit is exceeded it won't be possible to upload more
@ -212,7 +212,7 @@ DOMAIN=https://__DOMAIN____PATH_URL__
## Duo Settings ## Duo Settings
## You need to configure all options to enable global Duo support, otherwise users would need to configure it themselves ## You need to configure all options to enable global Duo support, otherwise users would need to configure it themselves
## Create an account and protect an application as mentioned in this link (only the first step, not the rest): ## Create an account and protect an application as mentioned in this link (only the first step, not the rest):
## https://help.bitwarden.com/article/setup-two-step-login-duo/#create-a-duo-security-account ## https://help.vaultwarden.com/article/setup-two-step-login-duo/#create-a-duo-security-account
## Then set the following options, based on the values obtained from the last step: ## Then set the following options, based on the values obtained from the last step:
# DUO_IKEY=<Integration Key> # DUO_IKEY=<Integration Key>
# DUO_SKEY=<Secret Key> # DUO_SKEY=<Secret Key>
@ -244,8 +244,8 @@ ROCKET_WORKERS=1
## To make sure the email links are pointing to the correct host, set the DOMAIN variable. ## To make sure the email links are pointing to the correct host, set the DOMAIN variable.
## Note: if SMTP_USERNAME is specified, SMTP_PASSWORD is mandatory ## Note: if SMTP_USERNAME is specified, SMTP_PASSWORD is mandatory
SMTP_HOST=127.0.0.1 SMTP_HOST=127.0.0.1
SMTP_FROM=bitwarden-rs@__DOMAIN__ SMTP_FROM=vaultwarden-rs@__DOMAIN__
SMTP_FROM_NAME=Bitwarden_RS SMTP_FROM_NAME=vaultwarden
SMTP_PORT=25 SMTP_PORT=25
SMTP_SSL=false SMTP_SSL=false
# SMTP_EXPLICIT_TLS=true # N.B. This variable configures Implicit TLS. It's currently mislabelled (see bug #851) # SMTP_EXPLICIT_TLS=true # N.B. This variable configures Implicit TLS. It's currently mislabelled (see bug #851)

View file

@ -8,7 +8,7 @@ about: When creating a bug report, please use the following template to provide
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 Bitwarden itself. Refer to its documentation or repository for help.* - *Otherwise, the issue may be due to vaultwarden itself. Refer to its documentation or repository for help.*
- *When in doubt, post here and 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.*
--- ---
@ -31,7 +31,7 @@ about: When creating a bug report, please use the following template to provide
- *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 bitwarden sudo yunohost app install vaultwarden
``` ```
- *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:*

View file

@ -1,13 +1,13 @@
{ {
"name": "Bitwarden", "name": "vaultwarden",
"id": "bitwarden", "id": "vaultwarden",
"packaging_format": 1, "packaging_format": 1,
"description": { "description": {
"en": "Manage passwords and other sensitive informations", "en": "Manage passwords and other sensitive informations",
"fr": "Gérez les mots de passe et autres informations sensibles" "fr": "Gérez les mots de passe et autres informations sensibles"
}, },
"version": "1.21.0~ynh1", "version": "1.21.0~ynh1",
"url": "https://github.com/dani-garcia/bitwarden_rs", "url": "https://github.com/dani-garcia/vaultwarden",
"license": "GPL-3.0-or-later", "license": "GPL-3.0-or-later",
"maintainer": { "maintainer": {
"name": "yalh76" "name": "yalh76"
@ -29,8 +29,8 @@
{ {
"name": "path", "name": "path",
"type": "path", "type": "path",
"example": "/bitwarden", "example": "/vaultwarden",
"default": "/bitwarden" "default": "/vaultwarden"
}, },
{ {
"name": "admin", "name": "admin",

View file

@ -76,7 +76,7 @@ fi
#================================================= #=================================================
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="systemd" --line_match="Stopped Bitwarden Server" ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" --line_match="Stopped vaultwarden Server"
#================================================= #=================================================
# MODIFY URL IN NGINX CONF # MODIFY URL IN NGINX CONF
@ -114,7 +114,7 @@ fi
#================================================= #=================================================
ynh_script_progression --message="Modifying a config file..." ynh_script_progression --message="Modifying a config file..."
config="$final_path/live/bitwarden_rs.env" config="$final_path/live/vaultwarden.env"
ynh_backup_if_checksum_is_different --file="$config" ynh_backup_if_checksum_is_different --file="$config"

View file

@ -92,7 +92,7 @@ ynh_script_progression --message="Setting up source files..."
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 the source of bitwarden_rs from app.src to his build directory # Download, check integrity, uncompress the source of vaultwarden from app.src to his build directory
ynh_setup_source --dest_dir="$final_path/build/" --source_id="app" ynh_setup_source --dest_dir="$final_path/build/" --source_id="app"
# Download, check integrity, uncompress and patch the source from web.src # Download, check integrity, uncompress and patch the source from web.src
@ -117,20 +117,20 @@ ynh_add_nginx_config "websocket_port rocket_port"
#================================================= #=================================================
ynh_script_progression --message="Making install..." ynh_script_progression --message="Making install..."
# Install rustup with the toolchain needed by bitwarden_rs # Install rustup with the toolchain needed by vaultwarden
pushd "$final_path" pushd "$final_path"
sudo -u "$app" RUSTUP_HOME="$final_path"/.rustup CARGO_HOME="$final_path"/.cargo bash -c 'curl -sSf -L https://static.rust-lang.org/rustup.sh | sh -s -- -y --default-toolchain nightly' sudo -u "$app" RUSTUP_HOME="$final_path"/.rustup CARGO_HOME="$final_path"/.cargo bash -c 'curl -sSf -L https://static.rust-lang.org/rustup.sh | sh -s -- -y --default-toolchain nightly'
popd popd
export PATH="$PATH:$final_path/.cargo/bin:$final_path/.local/bin:/usr/local/sbin" export PATH="$PATH:$final_path/.cargo/bin:$final_path/.local/bin:/usr/local/sbin"
# Compile bitwarden_rs # Compile vaultwarden
pushd "$final_path"/build pushd "$final_path"/build
ynh_exec_warn_less sudo -u "$app" env PATH="$PATH" cargo build --features sqlite --release ynh_exec_warn_less sudo -u "$app" env PATH="$PATH" cargo build --features sqlite --release
popd popd
# Install bitwarden_rs # Install vaultwarden
cp -af "$final_path/build/target/release/bitwarden_rs" "$final_path/live/bitwarden_rs" cp -af "$final_path/build/target/release/vaultwarden" "$final_path/live/vaultwarden"
# Remove build files and rustup # Remove build files and rustup
ynh_secure_remove --file="$final_path/build" ynh_secure_remove --file="$final_path/build"
@ -149,10 +149,10 @@ chown -R $app:$app "$final_path/live/data"
#================================================= #=================================================
ynh_script_progression --message="Adding a config file..." ynh_script_progression --message="Adding a config file..."
ynh_add_config --template="../conf/bitwarden_rs.env" --destination="$final_path/live/bitwarden_rs.env" ynh_add_config --template="../conf/vaultwarden.env" --destination="$final_path/live/vaultwarden.env"
chmod 400 "$final_path/live/bitwarden_rs.env" chmod 400 "$final_path/live/vaultwarden.env"
chown $app:$app "$final_path/live/bitwarden_rs.env" chown $app:$app "$final_path/live/vaultwarden.env"
#================================================= #=================================================
# SETUP SYSTEMD # SETUP SYSTEMD
@ -169,7 +169,7 @@ ynh_add_systemd_config
#================================================= #=================================================
ynh_script_progression --message="Integrating service in YunoHost..." ynh_script_progression --message="Integrating service in YunoHost..."
yunohost service add $app --description="$app daemon for Bitwarden" --log="/var/log/$app/$app.log" yunohost service add $app --description="$app daemon for vaultwarden" --log="/var/log/$app/$app.log"
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE

View file

@ -105,7 +105,7 @@ systemctl enable $app.service --quiet
#================================================= #=================================================
ynh_script_progression --message="Integrating service in YunoHost..." ynh_script_progression --message="Integrating service in YunoHost..."
yunohost service add $app --description="$app daemon for Bitwarden" --log="/var/log/$app/$app.log" yunohost service add $app --description="$app daemon for vaultwarden" --log="/var/log/$app/$app.log"
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE

View file

@ -78,7 +78,7 @@ ynh_remove_logrotate
#================================================= #=================================================
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="systemd" --line_match="Stopped Bitwarden Server" ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" --line_match="Stopped vaultwarden Server"
#================================================= #=================================================
# CREATE DEDICATED USER # CREATE DEDICATED USER
@ -96,7 +96,7 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
then then
ynh_script_progression --message="Upgrading source files..." ynh_script_progression --message="Upgrading source files..."
# Download, check integrity, uncompress the source of bitwarden_rs from app.src to his build directory # Download, check integrity, uncompress the source of vaultwarden from app.src to his build directory
ynh_setup_source --dest_dir="$final_path/build/" --source_id="app" ynh_setup_source --dest_dir="$final_path/build/" --source_id="app"
# Download, check integrity, uncompress and patch the source from web.src # Download, check integrity, uncompress and patch the source from web.src
@ -134,14 +134,14 @@ chown -R "$app":"$app" "$final_path"
if [ "$upgrade_type" == "UPGRADE_APP" ] if [ "$upgrade_type" == "UPGRADE_APP" ]
then then
# Install rustup with the toolchain needed by bitwarden_rs # Install rustup with the toolchain needed by vaultwarden
pushd "$final_path" pushd "$final_path"
sudo -u "$app" RUSTUP_HOME="$final_path"/.rustup CARGO_HOME="$final_path"/.cargo bash -c 'curl -sSf -L https://static.rust-lang.org/rustup.sh | sh -s -- -y --default-toolchain nightly' sudo -u "$app" RUSTUP_HOME="$final_path"/.rustup CARGO_HOME="$final_path"/.cargo bash -c 'curl -sSf -L https://static.rust-lang.org/rustup.sh | sh -s -- -y --default-toolchain nightly'
popd popd
export PATH="$PATH:$final_path/.cargo/bin:$final_path/.local/bin:/usr/local/sbin" export PATH="$PATH:$final_path/.cargo/bin:$final_path/.local/bin:/usr/local/sbin"
# Compile bitwarden_rs # Compile vaultwarden
pushd "$final_path"/build pushd "$final_path"/build
ynh_exec_warn_less sudo -u "$app" env PATH="$PATH" cargo build --features sqlite --release ynh_exec_warn_less sudo -u "$app" env PATH="$PATH" cargo build --features sqlite --release
popd popd
@ -153,10 +153,10 @@ then
ynh_secure_remove --file="$final_path/live/examples" ynh_secure_remove --file="$final_path/live/examples"
ynh_secure_remove --file="$final_path/live/incremental" ynh_secure_remove --file="$final_path/live/incremental"
ynh_secure_remove --file="$final_path/live/.cargo-lock" ynh_secure_remove --file="$final_path/live/.cargo-lock"
ynh_secure_remove --file="$final_path/live/bitwarden_rs.d" ynh_secure_remove --file="$final_path/live/vaultwarden.d"
# Install bitwarden_rs # Install vaultwarden
cp -af "$final_path/build/target/release/bitwarden_rs" "$final_path/live/bitwarden_rs" cp -af "$final_path/build/target/release/vaultwarden" "$final_path/live/vaultwarden"
# Remove build files and rustup # Remove build files and rustup
ynh_secure_remove --file="$final_path/build" ynh_secure_remove --file="$final_path/build"
@ -169,10 +169,17 @@ fi
#================================================= #=================================================
ynh_script_progression --message="Updating a config file..." ynh_script_progression --message="Updating a config file..."
ynh_add_config --template="../conf/bitwarden_rs.env" --destination="$final_path/live/bitwarden_rs.env" # Manage app name change
if test -f "$final_path/live/bitwarden_rs.env"; then
mv -a "$final_path/live/bitwarden_rs.env" "$final_path/live/vaultwarden.env"
ynh_delete_file_checksum --file="$final_path/live/bitwarden_rs.env"
ynh_store_file_checksum --file="$final_path/live/vaultwarden.env"
fi
chmod 400 "$final_path/live/bitwarden_rs.env" ynh_add_config --template="../conf/vaultwarden.env" --destination="$final_path/live/vaultwarden.env"
chown $app:$app "$final_path/live/bitwarden_rs.env"
chmod 400 "$final_path/live/vaultwarden.env"
chown $app:$app "$final_path/live/vaultwarden.env"
#================================================= #=================================================
# SETUP SYSTEMD # SETUP SYSTEMD
@ -189,7 +196,7 @@ ynh_add_systemd_config
#================================================= #=================================================
ynh_script_progression --message="Integrating service in YunoHost..." ynh_script_progression --message="Integrating service in YunoHost..."
yunohost service add $app --description="$app daemon for Bitwarden" --log="/var/log/$app/$app.log" yunohost service add $app --description="$app daemon for vaultwarden" --log="/var/log/$app/$app.log"
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE