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
|
@ -37,25 +37,27 @@ msg_ok "Updated Python3"
|
|||
|
||||
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) }')
|
||||
$STD tar zxvf <(curl -fsSL https://github.com/mylar3/mylar3/archive/refs/tags/${RELEASE}.tar.gz)
|
||||
mv mylar3-${RELEASE:1} /opt/mylar3
|
||||
msg_info "Installing Mylar3 ${RELEASE} (Patience)"
|
||||
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
|
||||
$STD python3 -m pip install -r requirements.txt
|
||||
echo "${RELEASE:1}" >/opt/${APPLICATION}_version.txt
|
||||
msg_ok "Installed Mylar3"
|
||||
|
||||
msg_info "Creating Service"
|
||||
service_path="/etc/systemd/system/mylar3.service"
|
||||
echo "[Unit]
|
||||
Description=Mylar3
|
||||
After=network.target
|
||||
cat <<EOF >/etc/systemd/system/mylar3.service
|
||||
[Unit]
|
||||
Description=mylar3
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/mylar3
|
||||
ExecStart=python3 Mylar.py -p 8585
|
||||
Restart=always
|
||||
User=root
|
||||
[Install]
|
||||
WantedBy=multi-user.target" >$service_path
|
||||
systemctl enable --now -q mylar3.service
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl -q --now enable mylar3
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
|
@ -64,4 +66,4 @@ customize
|
|||
msg_info "Cleaning up"
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
msg_ok "Cleaned"
|
Loading…
Add table
Add a link
Reference in a new issue