Update saltstack.sh
This commit is contained in:
parent
290f4b8a93
commit
ee80d200d6
@ -32,9 +32,9 @@ function update_script() {
|
|||||||
RELEASE=$(curl -fsSL https://api.github.com/repos/saltstack/salt/releases/latest | jq -r .tag_name | sed 's/^v//')
|
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 /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||||
msg_info "Updating $APP to ${RELEASE}"
|
msg_info "Updating $APP to ${RELEASE}"
|
||||||
curl -fsSL "https://github.com/saltstack/salt/releases/download/v${RELEASE}/salt-master_${RELEASE}_amd64.deb" -o salt-master.deb
|
sudo sed -i 's/^\(Pin: version \).*/\1${RELEASE}/' /etc/apt/preferences.d/salt-pin-1001
|
||||||
$STD dpkg -i emby-server-deb_${LATEST}_amd64.deb
|
$STD apt-get update
|
||||||
systemctl restart salt-master
|
$STD apt-get upgrade -y
|
||||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||||
msg_ok "Updated ${APP} to ${RELEASE}"
|
msg_ok "Updated ${APP} to ${RELEASE}"
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user