fixes
This commit is contained in:
parent
e43ecba808
commit
92ca930cae
@ -1,51 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2025 tteck
|
|
||||||
# Author: MickLesk (Canbiz)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/Luligu/matterbridge/
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Install Matterbridge"
|
|
||||||
mkdir -p /root/Matterbridge
|
|
||||||
NODE_VERSION="22"
|
|
||||||
NODE_MODULE="matterbridge"
|
|
||||||
install_node_and_modules
|
|
||||||
msg_ok "Installed Matterbridge"
|
|
||||||
|
|
||||||
msg_info "Creating Service"
|
|
||||||
cat <<EOF >/etc/systemd/system/matterbridge.service
|
|
||||||
[Unit]
|
|
||||||
Description=matterbridge
|
|
||||||
After=network-online.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
ExecStart=matterbridge -bridge -service
|
|
||||||
WorkingDirectory=/root/Matterbridge
|
|
||||||
StandardOutput=inherit
|
|
||||||
StandardError=inherit
|
|
||||||
Restart=always
|
|
||||||
RestartSec=10s
|
|
||||||
TimeoutStopSec=30s
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
EOF
|
|
||||||
systemctl enable -q --now matterbridge
|
|
||||||
msg_ok "Created Service"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
|
||||||
$STD apt-get -y autoremove
|
|
||||||
$STD apt-get -y autoclean
|
|
||||||
msg_ok "Cleaned"
|
|
@ -10,20 +10,6 @@ fi
|
|||||||
source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/core.func)
|
source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/core.func)
|
||||||
load_functions
|
load_functions
|
||||||
|
|
||||||
# # Function to set STD mode based on verbosity
|
|
||||||
# set_std_mode() {
|
|
||||||
# if [ "$VERBOSE" = "yes" ]; then
|
|
||||||
# STD=""
|
|
||||||
# else
|
|
||||||
# STD="silent"
|
|
||||||
# fi
|
|
||||||
# }
|
|
||||||
|
|
||||||
# # Silent execution function
|
|
||||||
# silent() {
|
|
||||||
# "$@" >/dev/null 2>&1
|
|
||||||
# }
|
|
||||||
|
|
||||||
# This function enables IPv6 if it's not disabled and sets verbose mode
|
# This function enables IPv6 if it's not disabled and sets verbose mode
|
||||||
verb_ip6() {
|
verb_ip6() {
|
||||||
set_std_mode # Set STD mode based on VERBOSE
|
set_std_mode # Set STD mode based on VERBOSE
|
||||||
|
@ -13,20 +13,6 @@ fi
|
|||||||
source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/core.func)
|
source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/core.func)
|
||||||
load_functions
|
load_functions
|
||||||
|
|
||||||
# # Function to set STD mode based on verbosity
|
|
||||||
# set_std_mode() {
|
|
||||||
# if [ "$VERBOSE" = "yes" ]; then
|
|
||||||
# STD=""
|
|
||||||
# else
|
|
||||||
# STD="silent"
|
|
||||||
# fi
|
|
||||||
# }
|
|
||||||
|
|
||||||
# # Silent execution function
|
|
||||||
# silent() {
|
|
||||||
# "$@" >/dev/null 2>&1
|
|
||||||
# }
|
|
||||||
|
|
||||||
# This function enables IPv6 if it's not disabled and sets verbose mode
|
# This function enables IPv6 if it's not disabled and sets verbose mode
|
||||||
verb_ip6() {
|
verb_ip6() {
|
||||||
set_std_mode # Set STD mode based on VERBOSE
|
set_std_mode # Set STD mode based on VERBOSE
|
||||||
@ -64,13 +50,6 @@ error_handler() {
|
|||||||
# This function sets up the Container OS by generating the locale, setting the timezone, and checking the network connection
|
# This function sets up the Container OS by generating the locale, setting the timezone, and checking the network connection
|
||||||
setting_up_container() {
|
setting_up_container() {
|
||||||
msg_info "Setting up Container OS"
|
msg_info "Setting up Container OS"
|
||||||
#sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen
|
|
||||||
#locale_line=$(grep -v '^#' /etc/locale.gen | grep -E '^[a-zA-Z]' | awk '{print $1}' | head -n 1)
|
|
||||||
#echo "LANG=${locale_line}" >/etc/default/locale
|
|
||||||
#locale-gen >/dev/null
|
|
||||||
#export LANG=${locale_line}
|
|
||||||
#echo $tz >/etc/timezone
|
|
||||||
#ln -sf /usr/share/zoneinfo/$tz /etc/localtime
|
|
||||||
for ((i = RETRY_NUM; i > 0; i--)); do
|
for ((i = RETRY_NUM; i > 0; i--)); do
|
||||||
if [ "$(hostname -I)" != "" ]; then
|
if [ "$(hostname -I)" != "" ]; then
|
||||||
break
|
break
|
||||||
|
Loading…
x
Reference in New Issue
Block a user