From a10f82af3064dc8639989314d36f4d45cbb198ab Mon Sep 17 00:00:00 2001 From: myvesta <38690722+myvesta@users.noreply.github.com> Date: Sun, 5 Feb 2023 16:11:15 +0100 Subject: [PATCH] Create v-update-myvesta --- bin/v-update-myvesta | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 bin/v-update-myvesta diff --git a/bin/v-update-myvesta b/bin/v-update-myvesta new file mode 100644 index 00000000..9df80894 --- /dev/null +++ b/bin/v-update-myvesta @@ -0,0 +1,33 @@ +#!/bin/bash +# info: Get the very latest build of myVesta +# options: NONE +# +# The function is downloading the very latest build of myVesta + +#----------------------------------------------------------# +# Verifications # +#----------------------------------------------------------# + +whoami=$(whoami) +if [ "$whoami" != "root" ]; then + echo "You must be root to execute this script" + exit 1 +fi + +#----------------------------------------------------------# +# Action # +#----------------------------------------------------------# + +rm /var/cache/apt/archives/vesta_* > /dev/null 2>&1 +apt-get update +apt-get install --reinstall vesta + +#----------------------------------------------------------# +# Vesta # +#----------------------------------------------------------# + +echo "=== myVesta updated ===" + +log_event "$OK" "$ARGUMENTS" + +exit