mirror of
https://github.com/YunoHost-Apps/vaultwarden_ynh.git
synced 2024-09-03 18:26:31 +02:00
Merge pull request #136 from YunoHost-Apps/testing
Upgrade Vaultwarden to 1.21.0
This commit is contained in:
commit
3f7d7d2740
13 changed files with 91 additions and 116 deletions
32
README.md
32
README.md
|
@ -1,21 +1,21 @@
|
|||
# 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.20.0
|
||||
**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
|
||||
|
||||
|
@ -27,11 +27,11 @@ At the end of the installation, the admin user will receive a mail with the admi
|
|||
|
||||
## 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.bitwarden.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
|
||||
* Report a bug: https://github.com/YunoHost-Apps/vaultwarden_ynh/issues
|
||||
* App website: https://bitwarden.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/
|
||||
|
||||
---
|
||||
|
||||
## 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
|
||||
```
|
||||
|
|
32
README_fr.md
32
README_fr.md
|
@ -1,21 +1,21 @@
|
|||
# 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.20.0
|
||||
**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
|
||||
|
||||
|
@ -27,11 +27,11 @@ Après l'installation, l'utilisateur admin recevra un e-mail avec le admin_token
|
|||
|
||||
## 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.bitwarden.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
|
||||
* Signaler un bug : https://github.com/YunoHost-Apps/vaultwarden_ynh/issues
|
||||
* Site de l'application : https://bitwarden.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/
|
||||
|
||||
---
|
||||
|
||||
## 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
|
||||
```
|
||||
|
|
|
@ -17,24 +17,8 @@
|
|||
setup_private=1
|
||||
setup_public=1
|
||||
upgrade=1
|
||||
# 1.9.1~ynh3
|
||||
# upgrade=1 from_commit=501bf18eafcda987ac255d12ca213d15e63c5eef
|
||||
# 1.14.2~ynh2
|
||||
# upgrade=1 from_commit=2a7b9d6b6705be6e3a7217309a77b9def226eaa6
|
||||
# 1.15.1~ynh2
|
||||
# upgrade=1 from_commit=bb9dac9cc50e11d8ef60033a543f9e21b42d0d8e
|
||||
# 1.16.1~ynh2
|
||||
#upgrade=1 from_commit=5572d0420cf500fdb313c15b4ab40e7a6c38e294
|
||||
# 1.16.3~ynh1
|
||||
#upgrade=1 from_commit=576a173a43de914253645daa2c0b066f693a20f7
|
||||
# 1.16.3~ynh2
|
||||
#upgrade=1 from_commit=e2e958b1885f7a08e0d5afe5dada5c0dd44dd671
|
||||
# 1.16.3~ynh3
|
||||
#upgrade=1 from_commit=df2a0510288c352cfc03886763149f49839ed620
|
||||
# 1.19.0~ynh1
|
||||
#upgrade=1 from_commit=980f625ab1eb3136437ff6275bec7990c534282c
|
||||
# 1.20.0~ynh2
|
||||
#upgrade=1 from_commit=5250a50f0bf177a79b30c25f8b6baa7ef615f75e
|
||||
# Bitwarden 1.20.0~ynh4
|
||||
#upgrade=1 from_commit=d5e1fa7d327c55d8e5ae4c24e7c6aaac006256db
|
||||
backup_restore=1
|
||||
multi_instance=1
|
||||
port_already_use=0
|
||||
|
@ -43,21 +27,5 @@
|
|||
Email=yalh@yahoo.com
|
||||
Notification=all
|
||||
;;; Upgrade options
|
||||
; commit=501bf18eafcda987ac255d12ca213d15e63c5eef
|
||||
name=1.9.1~ynh3
|
||||
; commit=2a7b9d6b6705be6e3a7217309a77b9def226eaa6
|
||||
name=1.14.2~ynh2
|
||||
; commit=bb9dac9cc50e11d8ef60033a543f9e21b42d0d8e
|
||||
name=1.15.1~ynh2
|
||||
; commit=5572d0420cf500fdb313c15b4ab40e7a6c38e294
|
||||
name=1.16.1~ynh2
|
||||
; commit=576a173a43de914253645daa2c0b066f693a20f7
|
||||
name=1.16.3~ynh1
|
||||
; commit=e2e958b1885f7a08e0d5afe5dada5c0dd44dd671
|
||||
name=1.16.3~ynh2
|
||||
; commit=df2a0510288c352cfc03886763149f49839ed620
|
||||
name=1.16.3~ynh3
|
||||
; commit=980f625ab1eb3136437ff6275bec7990c534282c
|
||||
name=1.19.0~ynh1
|
||||
; commit=5250a50f0bf177a79b30c25f8b6baa7ef615f75e
|
||||
name=1.20.0~ynh2
|
||||
; commit=d5e1fa7d327c55d8e5ae4c24e7c6aaac006256db
|
||||
name=1.20.0~ynh4
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
SOURCE_URL=https://github.com/dani-garcia/bitwarden_rs/archive/1.20.0.tar.gz
|
||||
SOURCE_SUM=ffe64a8783594b8dc5d4415f3f6898108f6ca38b48e17cdba3d7390c406462abf415cf7d99bfe45e80487ac35488e0022c47af38555c3cd8d956a936d0a38a11
|
||||
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
|
||||
SOURCE_IN_SUBDIR=true
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
@ -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)
|
|
@ -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:*
|
||||
|
|
|
@ -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.20.0~ynh4",
|
||||
"url": "https://github.com/dani-garcia/bitwarden_rs",
|
||||
"version": "1.21.0~ynh1",
|
||||
"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",
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue