Skip to content

Commit 456751e

Browse files
Update opengist.sh
1 parent ef5bb1b commit 456751e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ct/opengist.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ function update_script() {
3535
msg_info "Stopping Service"
3636
systemctl stop opengist.service
3737
msg_ok "Stopped Service"
38+
apt-get update &>/dev/null
39+
apt-get upgrade &>/dev/null
3840
RELEASE=$(curl -s https://api.github.com/repos/thomiceli/opengist/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
3941
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
4042
msg_info "Updating ${APP} to v${RELEASE}"
@@ -45,6 +47,8 @@ function update_script() {
4547
chmod +x /opt/opengist/opengist
4648
echo "${RELEASE}" >"/opt/${APP}_version.txt"
4749
rm -rf /opt/opengist${RELEASE}-linux-amd64.tar.gz
50+
apt-get -y autoremove &>/dev/null
51+
apt-get -y autoclean &>/dev/null
4852
msg_ok "Updated ${APP} LXC"
4953

5054
msg_info "Starting Service"

0 commit comments

Comments
 (0)