Proxmox_Scripts/ct/alpine-vaultwarden.sh

57 lines
1.4 KiB
Bash

#!/usr/bin/env bash
source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/next/misc/alpine.func)
# Copyright (c) 2021-2023 tteck
# Author: tteck (tteckster)
# License: MIT
# https://github.com/tteck/Proxmox/raw/main/LICENSE
function header_info {
clear
cat <<"EOF"
_ __ ____ __
| | / /___ ___ __/ / /__ ______ __________/ /__v5____
| | / / __ `/ / / / / __/ | /| / / __ `/ ___/ __ / _ \/ __ \
| |/ / /_/ / /_/ / / /_ | |/ |/ / /_/ / / / /_/ / __/ / / /
|___/\__,_/\__,_/_/\__/ |__/|__/\__,_/_/ \__,_/\___/_/ /_/
Alpine
EOF
}
header_info
echo -e "Loading..."
APP="Alpine-Vaultwarden"
var_disk="0.3"
var_cpu="1"
var_ram="256"
var_os="alpine"
var_version="3.17"
variables
color
catch_errors
function update_script() {
UPD=$(whiptail --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \
"1" "Update VaultWarden" ON \
"2" "Show Admin Token" OFF \
3>&1 1>&2 2>&3)
header_info
if [ "$UPD" == "1" ]; then
apk update && apk upgrade
exit;
fi
if [ "$UPD" == "2" ]; then
cat /etc/conf.d/vaultwarden | grep "ADMIN_TOKEN" | awk '{print substr($2, 7) }'
exit
fi
}
start
build_container
description
msg_ok "Completed Successfully!\n"
echo -e "${APP} should be reachable by going to the following URL.
${BL}http://${IP}:8000${CL} \n"