| Server IP : 104.129.129.72 / Your IP : 216.73.216.229 Web Server : LiteSpeed System : Linux 123answers 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64 User : answe8064 ( 1002) PHP Version : 8.2.28 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /opt/installer/apps/ |
Upload File : |
#!/bin/bash
if [ -f "include/startup.sh" ]; then
. include/startup.sh
elif [ -f "../include/startup.sh" ]; then
. ../include/startup.sh
fi
checkTagExist nginx.success
rootDir=$(rootDir)
echo "Adding Grafana GPG key" | log
curlDownload https://packages.grafana.com/gpg.key
waitOrStop 0 "Key not downloaded from official source"
apt-key add gpg.key
echo "Adding official Grafana repository" | log
add-apt-repository "deb https://packages.grafana.com/oss/deb stable main"
apt update
echo "Installing Grafana from apt" | log
installPackage grafana
waitOrStop 0 "Failed to install Grafana"
echo "Starting and enabling Grafana Service" | log
systemctl start grafana-server
sleep 2
waitOrStop 0 "Failed to start Grafana service"
systemctl enable grafana-server
echo "Setting NGINX VirtualHost coonfiguration" | log
cp $rootDir/tweaks/extras/grafana/grafana.conf /etc/nginx/sites-available/
sed -i "s/CWMDOMAIN/${CWM_DOMAIN}/g" /etc/nginx/sites-available/grafana.conf
ln -s /etc/nginx/sites-available/grafana.conf /etc/nginx/sites-enabled/
unlink /etc/nginx/sites-enabled/default
unlink /etc/nginx/sites-enabled/default-ssl
systemctl restart nginx
waitOrStop 0 "Restart nginx service failed"
echo "Adding descriptions" | log
descriptionAppend "Grafana Web UI: https://${CWM_DOMAIN}"
descriptionAppend "Grafana default User: admin"
descriptionAppend "Grafana default Password: admin"
tagScript success
exit 0