Server IP : 184.154.167.98 / Your IP : 3.128.31.184 Web Server : Apache System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 User : puertode ( 1767) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /sbin/ |
Upload File : |
#!/usr/bin/bash # Wrapper for the grafana-cli binary # This file serves as a wrapper for the grafana-cli binary. It ensures we set # the system-wide Grafana configuration that was bundled with the package as we # use the binary. DEFAULT=/etc/sysconfig/grafana-server GRAFANA_HOME=/usr/share/grafana CONF_DIR=/etc/grafana DATA_DIR=/var/lib/grafana PLUGINS_DIR=/var/lib/grafana/plugins LOG_DIR=/var/log/grafana LIBEXEC_DIR=/usr/libexec/grafana CONF_FILE=$CONF_DIR/grafana.ini PROVISIONING_CFG_DIR=$CONF_DIR/provisioning EXECUTABLE=$LIBEXEC_DIR/grafana-cli if [ ! -x $EXECUTABLE ]; then echo "Program not installed or not executable" exit 5 fi # overwrite settings from default file if [ -f "$DEFAULT" ]; then . "$DEFAULT" fi OPTS=("--homepath=${GRAFANA_HOME}" "--config=${CONF_FILE}" "--pluginsDir=${PLUGINS_DIR}" "--configOverrides=cfg:default.paths.provisioning=$PROVISIONING_CFG_DIR \ cfg:default.paths.data=${DATA_DIR} \ cfg:default.paths.logs=${LOG_DIR} \ cfg:default.paths.plugins=${PLUGINS_DIR}") if [ "$(id -u)" -eq 0 -o "$(id -g)" -eq 0 ]; then cd "${GRAFANA_HOME}" exec runuser -u "${GRAFANA_USER}" -- "$EXECUTABLE" "${OPTS[@]}" "$@" elif [ "$(id -u -n)" = "${GRAFANA_USER}" ]; then cd "${GRAFANA_HOME}" exec "$EXECUTABLE" "${OPTS[@]}" "$@" else echo "$0: please run this script as user \"${GRAFANA_USER}\" or root." exit 5 fi