mirror of https://github.com/tteck/Proxmox.git
indentation
This commit is contained in:
parent
5b1bcc0ae8
commit
cb24aaadd8
|
@ -53,7 +53,10 @@ function default_settings() {
|
|||
|
||||
function update_script() {
|
||||
header_info
|
||||
if [[ ! -f /lib/systemd/system/npm.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
||||
if [[ ! -f /lib/systemd/system/npm.service ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest |
|
||||
grep "tag_name" |
|
||||
awk '{print substr($2, 3, length($2)-4) }')
|
||||
|
@ -132,7 +135,6 @@ cp -r dist/* /app/frontend
|
|||
cp -r app-images/* /app/frontend/images
|
||||
msg_ok "Built Frontend"
|
||||
|
||||
|
||||
msg_info "Initializing Backend"
|
||||
rm -rf /app/config/default.json &>/dev/null
|
||||
if [ ! -f /app/config/production.json ]; then
|
||||
|
|
|
@ -53,7 +53,10 @@ function default_settings() {
|
|||
}
|
||||
|
||||
function update_script() {
|
||||
if [[ ! -d /opt/paperless ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
||||
if [[ ! -d /opt/paperless ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
RELEASE=$(curl -s https://api.github.com/repos/paperless-ngx/paperless-ngx/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
SER=/etc/systemd/system/paperless-task-queue.service
|
||||
|
||||
|
|
|
@ -53,7 +53,10 @@ function default_settings() {
|
|||
|
||||
function update_script() {
|
||||
header_info
|
||||
if [[ ! -d /opt/photoprism ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
||||
if [[ ! -d /opt/photoprism ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
echo -e "\n ⚠️ Ensure you set 2vCPU & 3072MiB RAM MIMIMUM!!! \n"
|
||||
msg_info "Stopping PhotoPrism"
|
||||
sudo systemctl stop photoprism
|
||||
|
|
|
@ -52,7 +52,10 @@ function default_settings() {
|
|||
}
|
||||
|
||||
function update_script() {
|
||||
if [[ ! -f /etc/systemd/system/vaultwarden.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
||||
if [[ ! -f /etc/systemd/system/vaultwarden.service ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
VAULT=$(curl -s https://api.github.com/repos/dani-garcia/vaultwarden/releases/latest |
|
||||
grep "tag_name" |
|
||||
awk '{print substr($2, 2, length($2)-3) }')
|
||||
|
@ -96,7 +99,7 @@ msg_ok "Started Vaultwarden"
|
|||
|
||||
msg_ok "$VAULT Update Successful"
|
||||
echo -e "\n ⚠️ Ensure you set resources back to normal settings \n"
|
||||
exit;
|
||||
exit
|
||||
fi
|
||||
if [ "$UPD" == "2" ]; then
|
||||
msg_info "Stopping Vaultwarden"
|
||||
|
@ -116,7 +119,7 @@ msg_info "Starting Vaultwarden"
|
|||
systemctl start vaultwarden.service
|
||||
msg_ok "Started Vaultwarden"
|
||||
msg_ok "$WVRELEASE Update Successful"
|
||||
exit;
|
||||
exit
|
||||
fi
|
||||
if [ "$UPD" == "3" ]; then
|
||||
DIR=/usr/bin/vaultwarden
|
||||
|
|
|
@ -54,7 +54,10 @@ function default_settings() {
|
|||
|
||||
function update_script() {
|
||||
header_info
|
||||
if [[ ! -d /opt/zigbee2mqtt ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
||||
if [[ ! -d /opt/zigbee2mqtt ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
cd /opt/zigbee2mqtt
|
||||
|
||||
stop_zigbee2mqtt() {
|
||||
|
@ -87,21 +90,36 @@ fi
|
|||
stop_zigbee2mqtt
|
||||
|
||||
echo "Generating a backup of the configuration..."
|
||||
cp -R data data-backup || { echo "Failed to create backup."; exit 1; }
|
||||
cp -R data data-backup || {
|
||||
echo "Failed to create backup."
|
||||
exit 1
|
||||
}
|
||||
|
||||
echo "Initiating update"
|
||||
if ! git pull; then
|
||||
echo "Update failed, temporarily storing changes and trying again."
|
||||
git stash && git pull || (echo "Update failed even after storing changes. Aborting."; exit 1)
|
||||
git stash && git pull || (
|
||||
echo "Update failed even after storing changes. Aborting."
|
||||
exit 1
|
||||
)
|
||||
fi
|
||||
|
||||
echo "Acquiring necessary components..."
|
||||
npm ci || { echo "Failed to install necessary components."; exit 1; }
|
||||
npm ci || {
|
||||
echo "Failed to install necessary components."
|
||||
exit 1
|
||||
}
|
||||
|
||||
echo "Restoring configuration..."
|
||||
cp -R data-backup/* data || { echo "Failed to restore configuration."; exit 1; }
|
||||
cp -R data-backup/* data || {
|
||||
echo "Failed to restore configuration."
|
||||
exit 1
|
||||
}
|
||||
|
||||
rm -rf data-backup || { echo "Failed to remove backup directory."; exit 1; }
|
||||
rm -rf data-backup || {
|
||||
echo "Failed to remove backup directory."
|
||||
exit 1
|
||||
}
|
||||
|
||||
start_zigbee2mqtt
|
||||
|
||||
|
|
|
@ -53,7 +53,10 @@ function default_settings() {
|
|||
|
||||
function update_script() {
|
||||
header_info
|
||||
if [[ ! -d /opt/zwave-js-ui ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
||||
if [[ ! -d /opt/zwave-js-ui ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
RELEASE=$(curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
msg_info "Stopping Z-wave JS UI"
|
||||
systemctl stop zwave-js-ui.service
|
||||
|
|
Loading…
Reference in New Issue