mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-13 19:29:18 +00:00
fix: executable was inside the folder
This commit is contained in:
parent
3b17601c25
commit
92317fb30d
@ -33,6 +33,14 @@ function update_script() {
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
msg_info "Updating ${APP} LXC"
|
msg_info "Updating ${APP} LXC"
|
||||||
|
LATEST_URL=$(curl -s https://api.github.com/repos/thomiceli/opengist/releases/latest | jq -r '.assets[] | select(.name | contains("linux-amd64.tar.gz")).browser_download_url')
|
||||||
|
wget "$LATEST_URL"
|
||||||
|
mv opengist*.tar.gz opengist.tar.gz
|
||||||
|
tar -xf opengist.tar.gz
|
||||||
|
mv opengist/opengist /opt/opengist/opengist
|
||||||
|
mv opengist/config.yml /opt/opengist/config.yml
|
||||||
|
chmod +x /usr/local/bin/opengist
|
||||||
|
rm -rf opengist*
|
||||||
apt-get update &>/dev/null
|
apt-get update &>/dev/null
|
||||||
apt-get -y upgrade &>/dev/null
|
apt-get -y upgrade &>/dev/null
|
||||||
msg_ok "Updated Successfully"
|
msg_ok "Updated Successfully"
|
||||||
|
@ -17,9 +17,6 @@ msg_info "Installing Dependencies"
|
|||||||
$STD apt-get install -y curl
|
$STD apt-get install -y curl
|
||||||
$STD apt-get install -y jq
|
$STD apt-get install -y jq
|
||||||
$STD apt-get install -y sudo
|
$STD apt-get install -y sudo
|
||||||
$STD apt-get install -y mc
|
|
||||||
$STD apt-get install -y gnupg
|
|
||||||
$STD apt-get install -y apt-transport-https
|
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Download Opengist Binary"
|
msg_info "Download Opengist Binary"
|
||||||
@ -28,30 +25,33 @@ wget "$LATEST_URL"
|
|||||||
msg_ok "Downloaded Opengist Binary"
|
msg_ok "Downloaded Opengist Binary"
|
||||||
|
|
||||||
msg_info "Creating Systemd Service"
|
msg_info "Creating Systemd Service"
|
||||||
|
mkdir -p /opt/opengist
|
||||||
mv opengist*.tar.gz opengist.tar.gz
|
mv opengist*.tar.gz opengist.tar.gz
|
||||||
tar -xf opengist.tar.gz
|
tar -xf opengist.tar.gz
|
||||||
mv opengist /usr/local/bin
|
mv opengist/opengist /opt/opengist/opengist
|
||||||
|
mv opengist/config.yml /opt/opengist/config.yml
|
||||||
chmod +x /usr/local/bin/opengist
|
chmod +x /usr/local/bin/opengist
|
||||||
rm -rf opengist.tar.gz
|
rm -rf opengist*
|
||||||
cat <<EOF >/etc/systemd/system/opengist.service
|
cat <<EOF >/etc/systemd/system/opengist.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Opengist server to manage your Gists
|
Description=Opengist server to manage your Gists
|
||||||
Wants=network-online.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
|
||||||
WorkingDirectory=/opt/opengist
|
WorkingDirectory=/opt/opengist
|
||||||
ExecStart=/usr/local/bin/opengist
|
ExecStart=/opt/opengist/opengist
|
||||||
Restart=on-failure
|
Restart=always
|
||||||
|
User=root
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
|
msg_ok "Created Systemd Service"
|
||||||
|
|
||||||
msg_info "Starting Service"
|
msg_info "Starting Service"
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
systemctl enable -q --now opengist.service
|
systemctl enable -q --now opengist.service
|
||||||
msg_ok ""
|
msg_ok "Started Service"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
Loading…
Reference in New Issue
Block a user