Update saltstack.sh
This commit is contained in:
parent
ee80d200d6
commit
13768ea3ea
@ -32,7 +32,7 @@ function update_script() {
|
||||
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
|
||||
msg_info "Updating $APP to ${RELEASE}"
|
||||
sudo sed -i 's/^\(Pin: version \).*/\1${RELEASE}/' /etc/apt/preferences.d/salt-pin-1001
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user