mirror of
https://github.com/YunoHost-Apps/vaultwarden_ynh.git
synced 2024-09-03 18:26:31 +02:00
several fixes
This commit is contained in:
parent
a191a0c2d1
commit
395706f048
5 changed files with 13 additions and 29 deletions
|
@ -83,10 +83,7 @@ ynh_backup --src_path="/etc/systemd/system/$app.service"
|
|||
#=================================================
|
||||
ynh_print_info --message="Starting a systemd service..."
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Rocket has launched from"
|
||||
if [ "${PACKAGE_CHECK_EXEC:-0}" -eq 1 ]; then
|
||||
sleep 60
|
||||
fi
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Rocket has launched from" --length=100
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
|
@ -118,10 +118,7 @@ fi
|
|||
#=================================================
|
||||
ynh_print_info --message="Starting a systemd service..."
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Rocket has launched from"
|
||||
if [ "${PACKAGE_CHECK_EXEC:-0}" -eq 1 ]; then
|
||||
sleep 60
|
||||
fi
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Rocket has launched from" --length=100
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
|
|
|
@ -121,16 +121,16 @@ ynh_print_info --message="Making install..."
|
|||
chown -R "$app":"$app" "$final_path"
|
||||
|
||||
# Install rustup with the toolchain needed by bitwarden_rs
|
||||
pushd "$final_path" || exit
|
||||
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=$(cat build/rust-toolchain)'
|
||||
popd || exit
|
||||
popd
|
||||
|
||||
export PATH="$PATH:$final_path/.cargo/bin:$final_path/.local/bin:/usr/local/sbin"
|
||||
|
||||
# Compile bitwarden_rs
|
||||
pushd "$final_path"/build || exit
|
||||
pushd "$final_path"/build
|
||||
sudo -u "$app" env PATH="$PATH" cargo build --features sqlite --release
|
||||
popd || exit
|
||||
popd
|
||||
|
||||
# Install bitwarden_rs
|
||||
cp -a "$final_path"/build/target/release/. "$final_path"/live/.
|
||||
|
@ -204,11 +204,7 @@ yunohost service add $app --description "$app daemon for Bitwarden" --log "/var/
|
|||
ynh_print_info --message="Starting a systemd service..."
|
||||
|
||||
# Start a systemd service
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Rocket has launched from"
|
||||
if [ "${PACKAGE_CHECK_EXEC:-0}" -eq 1 ]; then
|
||||
ynh_systemd_action --service_name="$app" --action="restart" --log_path="systemd" --line_match="Rocket has launched from"
|
||||
sleep 60
|
||||
fi
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Rocket has launched from" --length=100
|
||||
|
||||
#=================================================
|
||||
# SETUP FAIL2BAN
|
||||
|
|
|
@ -120,10 +120,7 @@ yunohost service add $app --description "$app daemon for Bitwarden" --log "/var/
|
|||
ynh_print_info --message="Starting a systemd service..."
|
||||
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Rocket has launched from"
|
||||
if [ "${PACKAGE_CHECK_EXEC:-0}" -eq 1 ]; then
|
||||
sleep 60
|
||||
fi
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Rocket has launched from" --length=100
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE LOGROTATE CONFIGURATION
|
||||
|
|
|
@ -128,16 +128,16 @@ chown -R "$app":"$app" "$final_path"
|
|||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
then
|
||||
# Install rustup with the toolchain needed by bitwarden_rs
|
||||
pushd "$final_path" || exit
|
||||
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=$(cat build/rust-toolchain)'
|
||||
popd || exit
|
||||
popd
|
||||
|
||||
export PATH="$PATH:$final_path/.cargo/bin:$final_path/.local/bin:/usr/local/sbin"
|
||||
|
||||
# Compile bitwarden_rs
|
||||
pushd "$final_path"/build || exit
|
||||
pushd "$final_path"/build
|
||||
sudo -u "$app" env PATH="$PATH" cargo build --features sqlite --release
|
||||
popd || exit
|
||||
popd
|
||||
|
||||
# Install bitwarden_rs
|
||||
cp -a "$final_path"/build/target/release/. "$final_path"/live/.
|
||||
|
@ -226,10 +226,7 @@ fi
|
|||
#=================================================
|
||||
ynh_print_info --message="Starting a systemd service..."
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Rocket has launched from"
|
||||
if [ "${PACKAGE_CHECK_EXEC:-0}" -eq 1 ]; then
|
||||
sleep 60
|
||||
fi
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Rocket has launched from" --length=100
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
|
|
Loading…
Reference in a new issue