Compare commits

...

2 Commits

Author SHA1 Message Date
CanbiZ
e27a6714a6 Merge branch 'main' of https://github.com/community-scripts/ProxmoxVED 2025-07-21 14:53:09 +02:00
CanbiZ
ca03967f6a Update salt.sh 2025-07-21 14:53:07 +02:00

View File

@ -30,12 +30,12 @@ function update_script() {
fi
RELEASE=$(curl -fsSL https://api.github.com/repos/saltstack/salt/releases/latest | jq -r .tag_name | sed 's/^v//')
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
if [[ ! -f /~.salt ]] || [[ "${RELEASE}" != "$(cat /~.salt)" ]]; then
msg_info "Updating $APP to ${RELEASE}"
sed -i "s/^\(Pin: version \).*/\1${RELEASE}/" /etc/apt/preferences.d/salt-pin-1001
$STD apt-get update
$STD apt-get upgrade -y
echo "${RELEASE}" >/opt/${APP}_version.txt
echo "${RELEASE}" >/~.salt
msg_ok "Updated ${APP} to ${RELEASE}"
else
msg_ok "${APP} is already up to date (${RELEASE})"