mirror of
https://github.com/tteck/Proxmox.git
synced 2024-11-26 08:33:17 +01:00
Update matterbridge-install.sh
refactor fixes https://github.com/tteck/Proxmox/issues/3499
This commit is contained in:
parent
3c41499074
commit
a28eb2fd46
@ -15,17 +15,11 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies (Patience)"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y --no-install-recommends \
|
$STD apt-get install -y curl
|
||||||
build-essential \
|
$STD apt-get install -y sudo
|
||||||
unzip \
|
$STD apt-get install -y mc
|
||||||
curl \
|
$STD apt-get install -y gpg
|
||||||
sudo \
|
|
||||||
git \
|
|
||||||
make \
|
|
||||||
gnupg \
|
|
||||||
ca-certificates \
|
|
||||||
mc
|
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Setting up Node.js Repository"
|
msg_info "Setting up Node.js Repository"
|
||||||
@ -40,15 +34,7 @@ $STD apt-get install -y nodejs
|
|||||||
msg_ok "Installed Node.js"
|
msg_ok "Installed Node.js"
|
||||||
|
|
||||||
msg_info "Install Matterbridge"
|
msg_info "Install Matterbridge"
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/Luligu/matterbridge/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
$STD npm install -g matterbridge
|
||||||
wget -q "https://github.com/Luligu/matterbridge/archive/refs/tags/${RELEASE}.zip"
|
|
||||||
unzip -q ${RELEASE}.zip
|
|
||||||
mv matterbridge-${RELEASE} /opt/matterbridge
|
|
||||||
rm -R ${RELEASE}.zip
|
|
||||||
cd /opt/matterbridge
|
|
||||||
$STD npm ci
|
|
||||||
$STD npm run build
|
|
||||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
|
||||||
msg_ok "Installed Matterbridge"
|
msg_ok "Installed Matterbridge"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
@ -59,16 +45,13 @@ After=network-online.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
ExecStart=/usr/bin/npm run start:bridge
|
ExecStart=matterbridge -bridge -service
|
||||||
WorkingDirectory=/opt/matterbridge
|
WorkingDirectory=/root/Matterbridge
|
||||||
StandardOutput=inherit
|
StandardOutput=inherit
|
||||||
StandardError=inherit
|
StandardError=inherit
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=10s
|
RestartSec=10s
|
||||||
TimeoutStopSec=30s
|
TimeoutStopSec=30s
|
||||||
User=root
|
|
||||||
Environment=PATH=/usr/bin:/usr/local/bin:/opt/matterbridge/bin
|
|
||||||
Environment=NODE_ENV=production
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
Loading…
Reference in New Issue
Block a user