mirror of
https://github.com/tteck/Proxmox.git
synced 2025-02-15 06:09:15 +01:00
more changes
This commit is contained in:
parent
4a73b31efc
commit
5a75542273
2 changed files with 14 additions and 15 deletions
|
@ -59,10 +59,7 @@ if [[ ! -d /opt/mylar3 ]]; then msg_error "No ${APP} Installation Found!"; exit;
|
||||||
msg_info "Updating $APP"
|
msg_info "Updating $APP"
|
||||||
systemctl stop mylar3.service
|
systemctl stop mylar3.service
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/mylar3/mylar3/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
RELEASE=$(curl -s https://api.github.com/repos/mylar3/mylar3/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||||
tar zxvf <(curl -fsSL https://github.com/mylar3/mylar3/archive/refs/tags/${RELEASE}.tar.gz) &>/dev/null
|
tar zxvf <(curl -fsSL https://github.com/mylar3/mylar3/archive/refs/tags/${RELEASE}.tar.gz) -C /opt/mylar3
|
||||||
RELEASE="${RELEASE:1}"
|
|
||||||
\cp -r mylar3-${RELEASE}/* /opt/mylar3 &>/dev/null
|
|
||||||
rm -rf mylar3-${RELEASE}
|
|
||||||
cd /opt/mylar3
|
cd /opt/mylar3
|
||||||
python3 -m pip install -r requirements.txt &>/dev/null
|
python3 -m pip install -r requirements.txt &>/dev/null
|
||||||
systemctl start mylar3.service
|
systemctl start mylar3.service
|
||||||
|
|
|
@ -37,25 +37,27 @@ msg_ok "Updated Python3"
|
||||||
|
|
||||||
msg_info "Installing Mylar3"
|
msg_info "Installing Mylar3"
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/mylar3/mylar3/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
RELEASE=$(curl -s https://api.github.com/repos/mylar3/mylar3/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||||
$STD tar zxvf <(curl -fsSL https://github.com/mylar3/mylar3/archive/refs/tags/${RELEASE}.tar.gz)
|
msg_info "Installing Mylar3 ${RELEASE} (Patience)"
|
||||||
mv mylar3-${RELEASE:1} /opt/mylar3
|
mkdir -p /opt/mylar3
|
||||||
|
tar zxvf <(curl -fsSL https://github.com/mylar3/mylar3/archive/refs/tags/${RELEASE}.tar.gz) -C /opt/mylar3 --strip-components=1
|
||||||
cd /opt/mylar3
|
cd /opt/mylar3
|
||||||
$STD python3 -m pip install -r requirements.txt
|
$STD python3 -m pip install -r requirements.txt
|
||||||
|
echo "${RELEASE:1}" >/opt/${APPLICATION}_version.txt
|
||||||
msg_ok "Installed Mylar3"
|
msg_ok "Installed Mylar3"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
service_path="/etc/systemd/system/mylar3.service"
|
cat <<EOF >/etc/systemd/system/mylar3.service
|
||||||
echo "[Unit]
|
[Unit]
|
||||||
Description=Mylar3
|
Description=mylar3
|
||||||
After=network.target
|
|
||||||
[Service]
|
[Service]
|
||||||
|
Type=simple
|
||||||
WorkingDirectory=/opt/mylar3
|
WorkingDirectory=/opt/mylar3
|
||||||
ExecStart=python3 Mylar.py -p 8585
|
ExecStart=python3 Mylar.py -p 8585
|
||||||
Restart=always
|
|
||||||
User=root
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target" >$service_path
|
WantedBy=multi-user.target
|
||||||
systemctl enable --now -q mylar3.service
|
EOF
|
||||||
|
systemctl -q --now enable mylar3
|
||||||
msg_ok "Created Service"
|
msg_ok "Created Service"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
|
@ -64,4 +66,4 @@ customize
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
$STD apt-get -y autoremove
|
$STD apt-get -y autoremove
|
||||||
$STD apt-get -y autoclean
|
$STD apt-get -y autoclean
|
||||||
msg_ok "Cleaned"
|
msg_ok "Cleaned"
|
Loading…
Add table
Add a link
Reference in a new issue