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

Merge pull request #194 from YunoHost-Apps/testing

Several Fixes
This commit is contained in:
yalh76 2022-07-06 12:22:21 +02:00 committed by GitHub
commit 091da18e3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 14 additions and 11 deletions

View file

@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
Alternative implementation of the Bitwarden server API written in Rust and compatible with upstream Bitwarden clients*, perfect for self-hosted deployment where running the official resource-heavy service might not be ideal. Alternative implementation of the Bitwarden server API written in Rust and compatible with upstream Bitwarden clients*, perfect for self-hosted deployment where running the official resource-heavy service might not be ideal.
**Shipped version:** 1.25.0~ynh1 **Shipped version:** 1.25.0~ynh2
**Demo:** https://vault.bitwarden.com/#/register **Demo:** https://vault.bitwarden.com/#/register

View file

@ -17,7 +17,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
Alternative implementation of the Bitwarden server API written in Rust and compatible with upstream Bitwarden clients*, perfect for self-hosted deployment where running the official resource-heavy service might not be ideal. Alternative implementation of the Bitwarden server API written in Rust and compatible with upstream Bitwarden clients*, perfect for self-hosted deployment where running the official resource-heavy service might not be ideal.
**Version incluse :** 1.25.0~ynh1 **Version incluse :** 1.25.0~ynh2
**Démo :** https://vault.bitwarden.com/#/register **Démo :** https://vault.bitwarden.com/#/register

View file

@ -8,7 +8,7 @@ After=network.target
User=__APP__ User=__APP__
Group=__APP__ Group=__APP__
WorkingDirectory=__FINALPATH__/live/ WorkingDirectory=__FINALPATH__/live/
ReadWriteDirectories=__FINALPATH__/live/ __DATADIR__ ReadWriteDirectories=__FINALPATH__/live/ __DATADIR__ /var/log/__APP__/
EnvironmentFile=__FINALPATH__/live/.env EnvironmentFile=__FINALPATH__/live/.env
ExecStart=__FINALPATH__/live/vaultwarden ExecStart=__FINALPATH__/live/vaultwarden

View file

@ -6,7 +6,7 @@
"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.25.0~ynh1", "version": "1.25.0~ynh2",
"url": "https://github.com/dani-garcia/vaultwarden", "url": "https://github.com/dani-garcia/vaultwarden",
"upstream": { "upstream": {
"license": "GPL-3.0-or-later", "license": "GPL-3.0-or-later",

View file

@ -129,7 +129,7 @@ export PATH="$PATH:$final_path/.cargo/bin:$final_path/.local/bin:/usr/local/sbin
# Compile vaultwarden # Compile vaultwarden
pushd "$final_path"/build pushd "$final_path"/build
ynh_exec_warn_less ynh_exec_as "$app" env PATH="$PATH" cargo build --features sqlite --release ynh_exec_warn_less ynh_exec_as "$app" env PATH="$PATH" CARGO_HOME="$final_path/.cargo" $final_path/.cargo/bin/cargo build --features sqlite --release
popd popd
# Install vaultwarden # Install vaultwarden
@ -196,7 +196,8 @@ ynh_script_progression --message="Configuring Fail2Ban..."
# Create a dedicated Fail2Ban config # Create a dedicated Fail2Ban config
mkdir -p "/var/log/$app" mkdir -p "/var/log/$app"
touch /var/log/"$app"/"$app".log touch "/var/log/$app/$app.log"
chown -R $app:$app "/var/log/$app"
ynh_add_fail2ban_config --logpath="/var/log/$app/$app.log" --failregex="^.*Username or password is incorrect\. Try again\. IP: <HOST>\. Username:.*$" ynh_add_fail2ban_config --logpath="/var/log/$app/$app.log" --failregex="^.*Username or password is incorrect\. Try again\. IP: <HOST>\. Username:.*$"
#================================================= #=================================================

View file

@ -88,7 +88,8 @@ ynh_script_progression --message="Restoring the Fail2Ban configuration..."
# Create a dedicated Fail2Ban config # Create a dedicated Fail2Ban config
mkdir -p "/var/log/$app" mkdir -p "/var/log/$app"
touch /var/log/"$app"/"$app".log touch "/var/log/$app/$app.log"
chown -R $app:$app "/var/log/$app"
ynh_restore_file --origin_path="/etc/fail2ban/jail.d/$app.conf" ynh_restore_file --origin_path="/etc/fail2ban/jail.d/$app.conf"
ynh_restore_file --origin_path="/etc/fail2ban/filter.d/$app.conf" ynh_restore_file --origin_path="/etc/fail2ban/filter.d/$app.conf"

View file

@ -196,7 +196,7 @@ then
# Compile vaultwarden # Compile vaultwarden
pushd "$final_path"/build pushd "$final_path"/build
ynh_exec_warn_less ynh_exec_as "$app" env PATH="$PATH" cargo build --features sqlite --release ynh_exec_warn_less ynh_exec_as "$app" env PATH="$PATH" CARGO_HOME="$final_path/.cargo" $final_path/.cargo/bin/cargo build --features sqlite --release
popd popd
# Remove old generated files before copying the new ones # Remove old generated files before copying the new ones
@ -257,7 +257,8 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --l
ynh_script_progression --message="Reconfiguring Fail2Ban..." ynh_script_progression --message="Reconfiguring Fail2Ban..."
mkdir -p "/var/log/$app" mkdir -p "/var/log/$app"
touch /var/log/"$app"/"$app".log touch "/var/log/$app/$app.log"
chown -R $app:$app "/var/log/$app"
# Create a dedicated Fail2Ban config # Create a dedicated Fail2Ban config
ynh_add_fail2ban_config --logpath="/var/log/$app/$app.log" --failregex="^.*Username or password is incorrect\. Try again\. IP: <HOST>\. Username:.*$" ynh_add_fail2ban_config --logpath="/var/log/$app/$app.log" --failregex="^.*Username or password is incorrect\. Try again\. IP: <HOST>\. Username:.*$"