From da1e8912f868fec11ee634793d97d56ffdae3c8f Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 30 Apr 2021 13:49:31 +0200 Subject: [PATCH] Name change --- README.md | 36 +++++++++++----------- README_fr.md | 36 +++++++++++----------- conf/app.src | 2 +- conf/message | 6 ++-- conf/systemd.service | 12 ++++---- conf/{bitwarden_rs.env => vaultwarden.env} | 14 ++++----- issue_template.md | 4 +-- manifest.json | 10 +++--- scripts/change_url | 4 +-- scripts/install | 18 +++++------ scripts/restore | 2 +- scripts/upgrade | 29 ++++++++++------- 12 files changed, 90 insertions(+), 83 deletions(-) rename conf/{bitwarden_rs.env => vaultwarden.env} (96%) diff --git a/README.md b/README.md index 9ef74e6..a6b7436 100644 --- a/README.md +++ b/README.md @@ -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) -[![Install Bitwarden with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=bitwarden) +[![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 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)* -> *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.* ## Overview -Bitwarden is a open source password manager. +vaultwarden is a open source password manager. **Shipped version:** 1.21.0 ## 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 -![](https://bitwarden.com/images/hero.png) +![](https://vaultwarden.com/images/hero.png) ## Demo -* [Official demo](https://vault.bitwarden.com/#/register) +* [Official demo](https://vault.vaultwarden.com/#/register) ## 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 - * 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 @@ -42,25 +42,25 @@ How to configure this app: by an admin panel at https://bitwarden.domain.tld/adm #### Supported architectures -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/bitwarden.svg)](https://ci-apps.yunohost.org/ci/apps/bitwarden/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/bitwarden.svg)](https://ci-apps-arm.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/vaultwarden.svg)](https://ci-apps-arm.yunohost.org/ci/apps/vaultwarden/) ## Links - * Report a bug: https://github.com/YunoHost-Apps/bitwarden_ynh/issues - * App website: https://bitwarden.com/ - * Upstream app repository: https://github.com/dani-garcia/bitwarden_rs + * Report a bug: https://github.com/YunoHost-Apps/vaultwarden_ynh/issues + * App website: https://vaultwarden.com/ + * Upstream app repository: https://github.com/dani-garcia/vaultwarden * YunoHost website: https://yunohost.org/ --- ## 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. ``` -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 -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 ``` diff --git a/README_fr.md b/README_fr.md index 5518445..b6e0dba 100644 --- a/README_fr.md +++ b/README_fr.md @@ -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) -[![Installer Bitwarden avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=bitwarden) +[![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 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)* -> *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.* ## 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 ## 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 -![](https://bitwarden.com/images/hero.png) +![](https://vaultwarden.com/images/hero.png) ## Démo -* [Démo officielle](https://vault.bitwarden.com/#/register) +* [Démo officielle](https://vault.vaultwarden.com/#/register) ## 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 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 @@ -42,25 +42,25 @@ Comment configurer cette application : via le panneau d'administration https://b #### Architectures supportées -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/bitwarden.svg)](https://ci-apps.yunohost.org/ci/apps/bitwarden/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/bitwarden.svg)](https://ci-apps-arm.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/vaultwarden.svg)](https://ci-apps-arm.yunohost.org/ci/apps/vaultwarden/) ## Liens - * Signaler un bug : https://github.com/YunoHost-Apps/bitwarden_ynh/issues - * Site de l'application : https://bitwarden.com/ - * Dépôt de l'application principale : https://github.com/dani-garcia/bitwarden_rs + * Signaler un bug : https://github.com/YunoHost-Apps/vaultwarden_ynh/issues + * Site de l'application : https://vaultwarden.com/ + * Dépôt de l'application principale : https://github.com/dani-garcia/vaultwarden * Site web YunoHost : https://yunohost.org/ --- ## 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. ``` -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 -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 ``` diff --git a/conf/app.src b/conf/app.src index 2f97480..bdffa99 100644 --- a/conf/app.src +++ b/conf/app.src @@ -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_PRG=sha512sum SOURCE_FORMAT=tar.gz diff --git a/conf/message b/conf/message index d349648..4d873a1 100644 --- a/conf/message +++ b/conf/message @@ -1,5 +1,5 @@ -Bitwarden was successfully installed :) +vaultwarden was successfully installed :) Please open https://__DOMAIN____PATH_URL__/admin The admin token is: __ADMIN_TOKEN__ -You will be able to invite users to your bitwarden 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 +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/vaultwarden_ynh diff --git a/conf/systemd.service b/conf/systemd.service index 7cf5e99..76d68b5 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -1,20 +1,20 @@ [Unit] -Description=Bitwarden Server (Rust Edition) -Documentation=https://github.com/dani-garcia/bitwarden_rs +Description=vaultwarden Server (Rust Edition) +Documentation=https://github.com/dani-garcia/vaultwarden After=network.target [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__ Group=__APP__ # 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 -ExecStart=__FINALPATH__/live/bitwarden_rs +ExecStart=__FINALPATH__/live/vaultwarden # Set reasonable connection and process limits LimitNOFILE=1048576 LimitNPROC=64 -# Isolate bitwarden_rs from the rest of the system +# Isolate vaultwarden from the rest of the system PrivateTmp=true PrivateDevices=true ProtectHome=true diff --git a/conf/bitwarden_rs.env b/conf/vaultwarden.env similarity index 96% rename from conf/bitwarden_rs.env rename to conf/vaultwarden.env index 5d1c47e..cd631a1 100644 --- a/conf/bitwarden_rs.env +++ b/conf/vaultwarden.env @@ -1,4 +1,4 @@ -## Bitwarden_RS Configuration File +## vaultwarden Configuration File ## Uncomment any of the following lines to change the defaults ## ## 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 ## 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, -## 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 ## cause performance degradation or might render the service unable to start. # ENABLE_DB_WAL=true @@ -126,7 +126,7 @@ LOG_FILE=/var/log/__APP__/__APP__.log ## Email token size ## 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 ## 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_ALLOWED=true ## 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) ## 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 ## 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): -## 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: # DUO_IKEY= # DUO_SKEY= @@ -244,8 +244,8 @@ ROCKET_WORKERS=1 ## 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 SMTP_HOST=127.0.0.1 -SMTP_FROM=bitwarden-rs@__DOMAIN__ -SMTP_FROM_NAME=Bitwarden_RS +SMTP_FROM=vaultwarden-rs@__DOMAIN__ +SMTP_FROM_NAME=vaultwarden SMTP_PORT=25 SMTP_SSL=false # SMTP_EXPLICIT_TLS=true # N.B. This variable configures Implicit TLS. It's currently mislabelled (see bug #851) diff --git a/issue_template.md b/issue_template.md index aa9b193..8ad515c 100644 --- a/issue_template.md +++ b/issue_template.md @@ -8,7 +8,7 @@ about: When creating a bug report, please use the following template to provide 1. *Read this whole template first.* 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!* - - *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.* 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:* ```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 the error occurs in your browser, explain what you did:* diff --git a/manifest.json b/manifest.json index 4a9b05e..819728b 100644 --- a/manifest.json +++ b/manifest.json @@ -1,13 +1,13 @@ { - "name": "Bitwarden", - "id": "bitwarden", + "name": "vaultwarden", + "id": "vaultwarden", "packaging_format": 1, "description": { "en": "Manage passwords and other sensitive informations", "fr": "Gérez les mots de passe et autres informations sensibles" }, "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", "maintainer": { "name": "yalh76" @@ -29,8 +29,8 @@ { "name": "path", "type": "path", - "example": "/bitwarden", - "default": "/bitwarden" + "example": "/vaultwarden", + "default": "/vaultwarden" }, { "name": "admin", diff --git a/scripts/change_url b/scripts/change_url index fafdaca..c592221 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -76,7 +76,7 @@ fi #================================================= 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 @@ -114,7 +114,7 @@ fi #================================================= 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" diff --git a/scripts/install b/scripts/install index 8cd9cbd..2f98459 100644 --- a/scripts/install +++ b/scripts/install @@ -92,7 +92,7 @@ ynh_script_progression --message="Setting up source files..." 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" # 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..." -# Install rustup with the toolchain needed by bitwarden_rs +# Install rustup with the toolchain needed by vaultwarden 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' popd export PATH="$PATH:$final_path/.cargo/bin:$final_path/.local/bin:/usr/local/sbin" -# Compile bitwarden_rs +# Compile vaultwarden pushd "$final_path"/build ynh_exec_warn_less sudo -u "$app" env PATH="$PATH" cargo build --features sqlite --release popd -# Install bitwarden_rs -cp -af "$final_path/build/target/release/bitwarden_rs" "$final_path/live/bitwarden_rs" +# Install vaultwarden +cp -af "$final_path/build/target/release/vaultwarden" "$final_path/live/vaultwarden" # Remove build files and rustup 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_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" -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 @@ -169,7 +169,7 @@ ynh_add_systemd_config #================================================= 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 diff --git a/scripts/restore b/scripts/restore index 7615ded..59a680f 100644 --- a/scripts/restore +++ b/scripts/restore @@ -105,7 +105,7 @@ systemctl enable $app.service --quiet #================================================= 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 diff --git a/scripts/upgrade b/scripts/upgrade index de68fb0..cf2bb2d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -78,7 +78,7 @@ ynh_remove_logrotate #================================================= 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 @@ -96,7 +96,7 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then 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" # 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" ] then - # Install rustup with the toolchain needed by bitwarden_rs + # Install rustup with the toolchain needed by vaultwarden 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' popd export PATH="$PATH:$final_path/.cargo/bin:$final_path/.local/bin:/usr/local/sbin" - # Compile bitwarden_rs + # Compile vaultwarden pushd "$final_path"/build ynh_exec_warn_less sudo -u "$app" env PATH="$PATH" cargo build --features sqlite --release popd @@ -153,10 +153,10 @@ then ynh_secure_remove --file="$final_path/live/examples" ynh_secure_remove --file="$final_path/live/incremental" 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 - cp -af "$final_path/build/target/release/bitwarden_rs" "$final_path/live/bitwarden_rs" + # Install vaultwarden + cp -af "$final_path/build/target/release/vaultwarden" "$final_path/live/vaultwarden" # Remove build files and rustup ynh_secure_remove --file="$final_path/build" @@ -169,10 +169,17 @@ fi #================================================= 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" -chown $app:$app "$final_path/live/bitwarden_rs.env" +ynh_add_config --template="../conf/vaultwarden.env" --destination="$final_path/live/vaultwarden.env" + +chmod 400 "$final_path/live/vaultwarden.env" +chown $app:$app "$final_path/live/vaultwarden.env" #================================================= # SETUP SYSTEMD @@ -189,7 +196,7 @@ ynh_add_systemd_config #================================================= 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