This commit is contained in:
svennd 2025-01-23 21:52:18 +01:00
parent b4032fa8b6
commit dded39642c
2 changed files with 13 additions and 7 deletions

View File

@ -29,6 +29,9 @@ msg_info "Installing Dependencies"
# system user is required # system user is required
$STD useradd librenms -d /opt/librenms -M -r $STD useradd librenms -d /opt/librenms -M -r
# set timezone
$STD timedatectl set-timezone Etc/UTC
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
@ -39,6 +42,9 @@ msg_info "php config"
-e "s|^listen = /run/php/php8.2-fpm.sock|listen = /run/php/librenms.sock|" \ -e "s|^listen = /run/php/php8.2-fpm.sock|listen = /run/php/librenms.sock|" \
-e "s|^user = www-data|user = librenms|" \ -e "s|^user = www-data|user = librenms|" \
-e "s|^group = www-data|group = librenms|" /etc/php/8.2/fpm/pool.d/librenms.conf -e "s|^group = www-data|group = librenms|" /etc/php/8.2/fpm/pool.d/librenms.conf
# set timezone
sed -i 's/^;date\.timezone =/date.timezone = Etc\/UTC/' /etc/php/8.2/fpm/php.ini
systemctl restart php8.2-fpm systemctl restart php8.2-fpm
msg_ok "php config" msg_ok "php config"
@ -56,8 +62,8 @@ msg_info "download librenms"
# scheduler # scheduler
cp /opt/librenms/dist/librenms-scheduler.service /opt/librenms/dist/librenms-scheduler.timer /etc/systemd/system/ cp /opt/librenms/dist/librenms-scheduler.service /opt/librenms/dist/librenms-scheduler.timer /etc/systemd/system/
systemctl enable librenms-scheduler.timer $STD systemctl enable librenms-scheduler.timer
systemctl start librenms-scheduler.timer $STD systemctl start librenms-scheduler.timer
msg_ok "download librenms" msg_ok "download librenms"

View File

@ -950,9 +950,9 @@ build_container() {
TEMP_DIR=$(mktemp -d) TEMP_DIR=$(mktemp -d)
pushd $TEMP_DIR >/dev/null pushd $TEMP_DIR >/dev/null
if [ "$var_os" == "alpine" ]; then if [ "$var_os" == "alpine" ]; then
export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/svennd/ProxmoxVE/librenms/misc/alpine-install.func)" export FUNCTIONS_FILE_PATH="$(curl -s https://github.com/community-scripts/ProxmoxVE/main/misc/alpine-install.func)"
else else
export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/svennd/ProxmoxVE/librenms/misc/install.func)" export FUNCTIONS_FILE_PATH="$(curl -s https://github.com/community-scripts/ProxmoxVE/main/misc/install.func)"
fi fi
export CACHER="$APT_CACHER" export CACHER="$APT_CACHER"
export CACHER_IP="$APT_CACHER_IP" export CACHER_IP="$APT_CACHER_IP"
@ -983,7 +983,7 @@ build_container() {
$PW $PW
" "
# This executes create_lxc.sh and creates the container and .conf file # This executes create_lxc.sh and creates the container and .conf file
bash -c "$(wget -qLO - https://raw.githubusercontent.com/svennd/ProxmoxVE/librenms/ct/create_lxc.sh)" || exit bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/main/ct/create_lxc.sh)" || exit
LXC_CONFIG=/etc/pve/lxc/${CTID}.conf LXC_CONFIG=/etc/pve/lxc/${CTID}.conf
if [ "$CT_TYPE" == "0" ]; then if [ "$CT_TYPE" == "0" ]; then
@ -1045,7 +1045,7 @@ http://dl-cdn.alpinelinux.org/alpine/latest-stable/community
EOF' EOF'
pct exec "$CTID" -- ash -c "apk add bash >/dev/null" pct exec "$CTID" -- ash -c "apk add bash >/dev/null"
fi fi
lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/svennd/ProxmoxVE/librenms/install/$var_install.sh)" || exit lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/main/install/$var_install.sh)" || exit
} }
@ -1057,7 +1057,7 @@ description() {
DESCRIPTION=$(cat <<EOF DESCRIPTION=$(cat <<EOF
<div align='center'> <div align='center'>
<a href='https://Helper-Scripts.com' target='_blank' rel='noopener noreferrer'> <a href='https://Helper-Scripts.com' target='_blank' rel='noopener noreferrer'>
<img src='https://raw.githubusercontent.com/svennd/ProxmoxVE/librenms/misc/images/logo-81x112.png' alt='Logo' style='width:81px;height:112px;'/> <img src='https://github.com/community-scripts/ProxmoxVE/main/misc/images/logo-81x112.png' alt='Logo' style='width:81px;height:112px;'/>
</a> </a>
<h2 style='font-size: 24px; margin: 20px 0;'>${APP} LXC</h2> <h2 style='font-size: 24px; margin: 20px 0;'>${APP} LXC</h2>