Skip to content

Commit

Permalink
fix rm command
Browse files Browse the repository at this point in the history
  • Loading branch information
BassT23 committed Dec 15, 2024
1 parent 372cde1 commit 7b8aa0a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ CONTAINER_BACKUP () {
echo -e "${BL}[Info]${GN} Deleted old snapshots${CL}"
LIST=$(pct listsnapshot "$CONTAINER" | sed -n "s/^.*Update\s*\(\S*\).*$/\1/p" | head -n -"$KEEP_SNAPSHOT")
for SNAPSHOTS in $LIST; do
pct delsnapshot "$CONTAINER" Update"$SNAPSHOTS"
pct delsnapshot "$CONTAINER" Update"$SNAPSHOTS" >/dev/null 2>&1
done
echo -e "${BL}[Info]${GN} Done${CL}"
else
Expand All @@ -387,7 +387,7 @@ VM_BACKUP () {
echo -e "${BL}[Info]${GN} Deleting old snapshot(s)${CL}"
LIST=$(qm listsnapshot "$VM" | sed -n "s/^.*Update\s*\(\S*\).*$/\1/p" | head -n -"$KEEP_SNAPSHOT")
for SNAPSHOTS in $LIST; do
qm delsnapshot "$VM" Update"$SNAPSHOTS"
qm delsnapshot "$VM" Update"$SNAPSHOTS" >/dev/null 2>&1
done
echo -e "${BL}[Info]${GN} Done${CL}"
else
Expand Down Expand Up @@ -418,15 +418,15 @@ EXTRAS () {
pct push "$CONTAINER" -- $LOCAL_FILES/update.conf $LOCAL_FILES/update.conf
pct exec "$CONTAINER" -- bash -c "chmod +x $LOCAL_FILES/update-extras.sh && \
$LOCAL_FILES/update-extras.sh && \
rm -rf $LOCAL_FILES"
rm -rf $LOCAL_FILES || true"
else
# Extras in VMS with SSH_CONNECTION
ssh -q -p "$SSH_PORT" "$IP" mkdir -p $LOCAL_FILES/
scp $LOCAL_FILES/update-extras.sh "$IP":$LOCAL_FILES/update-extras.sh
scp $LOCAL_FILES/update.conf "$IP":$LOCAL_FILES/update.conf
ssh -q -p "$SSH_PORT" "$IP" "chmod +x $LOCAL_FILES/update-extras.sh && \
$LOCAL_FILES/update-extras.sh && \
rm -rf $LOCAL_FILES"
rm -rf $LOCAL_FILES || true"
fi
echo -e "${GN}--- Finished extra updates ---${CL}"
if [[ "$WILL_STOP" != true ]] && [[ "$WELCOME_SCREEN" != true ]]; then
Expand Down

0 comments on commit 7b8aa0a

Please sign in to comment.