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:
parent
fa8d0b9190
commit
da1e8912f8
12 changed files with 90 additions and 83 deletions
36
README.md
36
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
|
||||
```
|
||||
|
|
36
README_fr.md
36
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
|
||||
```
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
@ -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=<Integration 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.
|
||||
## 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.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",
|
||||
|
|
|
@ -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