mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-06-23 15:54:56 +02:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3b45fc21ef |
+14
-3
@@ -29,10 +29,21 @@ function update_script() {
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
setup_mariadb
|
setup_mariadb
|
||||||
|
ensure_dependencies git
|
||||||
|
if [[ ! -d /opt/librenms/.git ]]; then
|
||||||
|
msg_info "Initializing LibreNMS git metadata"
|
||||||
|
LIBRENMS_VERSION=$(cat ~/.librenms 2>/dev/null)
|
||||||
|
cd /opt/librenms
|
||||||
|
git init -q
|
||||||
|
git remote add origin https://github.com/librenms/librenms.git
|
||||||
|
git fetch --depth 1 origin "refs/tags/v${LIBRENMS_VERSION}" 2>/dev/null ||
|
||||||
|
git fetch --depth 1 origin "refs/tags/${LIBRENMS_VERSION}" 2>/dev/null || true
|
||||||
|
git checkout -qf FETCH_HEAD 2>/dev/null || true
|
||||||
|
chown -R librenms:librenms .git
|
||||||
|
msg_ok "Initialized LibreNMS git metadata"
|
||||||
|
fi
|
||||||
msg_info "Updating LibreNMS"
|
msg_info "Updating LibreNMS"
|
||||||
su librenms
|
$STD su - librenms -s /bin/bash -c 'cd /opt/librenms && ./daily.sh'
|
||||||
cd /opt/librenms
|
|
||||||
./daily.sh
|
|
||||||
msg_ok "Updated LibreNMS"
|
msg_ok "Updated LibreNMS"
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ msg_info "Installing Dependencies"
|
|||||||
$STD apt install -y \
|
$STD apt install -y \
|
||||||
acl \
|
acl \
|
||||||
fping \
|
fping \
|
||||||
|
git \
|
||||||
graphviz \
|
graphviz \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
mtr-tiny \
|
mtr-tiny \
|
||||||
@@ -64,6 +65,16 @@ EOF
|
|||||||
chown -R librenms:librenms /opt/librenms
|
chown -R librenms:librenms /opt/librenms
|
||||||
chmod 771 /opt/librenms
|
chmod 771 /opt/librenms
|
||||||
chmod -R ug=rwX /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/logs /opt/librenms/rrd
|
chmod -R ug=rwX /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/logs /opt/librenms/rrd
|
||||||
|
if [[ ! -d /opt/librenms/.git ]]; then
|
||||||
|
LIBRENMS_VERSION=$(cat ~/.librenms 2>/dev/null)
|
||||||
|
cd /opt/librenms
|
||||||
|
git init -q
|
||||||
|
git remote add origin https://github.com/librenms/librenms.git
|
||||||
|
git fetch --depth 1 origin "refs/tags/v${LIBRENMS_VERSION}" 2>/dev/null ||
|
||||||
|
git fetch --depth 1 origin "refs/tags/${LIBRENMS_VERSION}" 2>/dev/null || true
|
||||||
|
git checkout -qf FETCH_HEAD 2>/dev/null || true
|
||||||
|
chown -R librenms:librenms .git
|
||||||
|
fi
|
||||||
msg_ok "Configured LibreNMS"
|
msg_ok "Configured LibreNMS"
|
||||||
|
|
||||||
msg_info "Configure MariaDB"
|
msg_info "Configure MariaDB"
|
||||||
|
|||||||
Reference in New Issue
Block a user