telegraf-1.3.1-1 T > D @ p ci .FU145ad0c2318620cf8d9b85f92ad7f8dde409a7a4 x > 9 $ ? $ d S $ @ N \ x ( D g Y ( m = t > | ? @ G H I J X Y \ ] ^ M b d e f l $ C telegraf 1.3.1 1 Plugin-driven server agent for reporting metrics into InfluxDB. Plugin-driven server agent for reporting metrics into InfluxDB. Y/?box723.localdomain InfluxData MIT support@influxdb.com default https://github.com/influxdata/telegraf linux armv6hl #!/bin/bash if [[ -d /etc/opt/telegraf ]]; then # Legacy configuration found if [[ ! -d /etc/telegraf ]]; then # New configuration does not exist, move legacy configuration to new location echo -e "Please note, Telegraf's configuration is now located at '/etc/telegraf' (previously '/etc/opt/telegraf')." mv -vn /etc/opt/telegraf /etc/telegraf if [[ -f /etc/telegraf/telegraf.conf ]]; then backup_name="telegraf.conf.$(date +%s).backup" echo "A backup of your current configuration can be found at: /etc/telegraf/${backup_name}" cp -a "/etc/telegraf/telegraf.conf" "/etc/telegraf/${backup_name}" fi fi fi #!/bin/bash BIN_DIR=/usr/bin LOG_DIR=/var/log/telegraf SCRIPT_DIR=/usr/lib/telegraf/scripts LOGROTATE_DIR=/etc/logrotate.d function install_init { cp -f $SCRIPT_DIR/init.sh /etc/init.d/telegraf chmod +x /etc/init.d/telegraf } function install_systemd { cp -f $SCRIPT_DIR/telegraf.service $1 systemctl enable telegraf || true systemctl daemon-reload || true } function install_update_rcd { update-rc.d telegraf defaults } function install_chkconfig { chkconfig --add telegraf } if ! grep "^telegraf:" /etc/group &>/dev/null; then groupadd -r telegraf fi if ! id telegraf &>/dev/null; then useradd -r -M telegraf -s /bin/false -d /etc/telegraf -g telegraf fi test -d $LOG_DIR || mkdir -p $LOG_DIR chown -R -L telegraf:telegraf $LOG_DIR chmod 755 $LOG_DIR # Remove legacy symlink, if it exists if [[ -L /etc/init.d/telegraf ]]; then rm -f /etc/init.d/telegraf fi # Remove legacy symlink, if it exists if [[ -L /etc/systemd/system/telegraf.service ]]; then rm -f /etc/systemd/system/telegraf.service fi # Add defaults file, if it doesn't exist if [[ ! -f /etc/default/telegraf ]]; then touch /etc/default/telegraf fi # Add .d configuration directory if [[ ! -d /etc/telegraf/telegraf.d ]]; then mkdir -p /etc/telegraf/telegraf.d fi # Distribution-specific logic if [[ -f /etc/redhat-release ]] || [[ -f /etc/SuSE-release ]]; then # RHEL-variant logic if [[ "$(readlink /proc/1/exe)" == */systemd ]]; then install_systemd /usr/lib/systemd/system/telegraf.service else # Assuming SysVinit install_init # Run update-rc.d or fallback to chkconfig if not available if which update-rc.d &>/dev/null; then install_update_rcd else install_chkconfig fi fi elif [[ -f /etc/debian_version ]]; then # Debian/Ubuntu logic if [[ "$(readlink /proc/1/exe)" == */systemd ]]; then install_systemd /lib/systemd/system/telegraf.service systemctl restart telegraf || echo "WARNING: systemd not running." else # Assuming SysVinit install_init # Run update-rc.d or fallback to chkconfig if not available if which update-rc.d &>/dev/null; then install_update_rcd else install_chkconfig fi invoke-rc.d telegraf restart fi elif [[ -f /etc/os-release ]]; then source /etc/os-release if [[ $ID = "amzn" ]]; then # Amazon Linux logic install_init # Run update-rc.d or fallback to chkconfig if not available if which update-rc.d &>/dev/null; then install_update_rcd else install_chkconfig fi /etc/init.d/telegraf restart fi fi #!/bin/bash BIN_DIR=/usr/bin # Distribution-specific logic if [[ -f /etc/debian_version ]]; then # Debian/Ubuntu logic if [[ "$(readlink /proc/1/exe)" == */systemd ]]; then deb-systemd-invoke stop telegraf.service else # Assuming sysv invoke-rc.d telegraf stop fi fi #!/bin/bash function disable_systemd { systemctl disable telegraf rm -f $1 } function disable_update_rcd { update-rc.d -f telegraf remove rm -f /etc/init.d/telegraf } function disable_chkconfig { chkconfig --del telegraf rm -f /etc/init.d/telegraf } if [[ -f /etc/redhat-release ]] || [[ -f /etc/SuSE-release ]]; then # RHEL-variant logic if [[ "$1" = "0" ]]; then # InfluxDB is no longer installed, remove from init system rm -f /etc/default/telegraf if [[ "$(readlink /proc/1/exe)" == */systemd ]]; then disable_systemd /usr/lib/systemd/system/telegraf.service else # Assuming sysv disable_chkconfig fi fi elif [[ -f /etc/debian_version ]]; then # Debian/Ubuntu logic if [ "$1" == "remove" -o "$1" == "purge" ]; then # Remove/purge rm -f /etc/default/telegraf if [[ "$(readlink /proc/1/exe)" == */systemd ]]; then disable_systemd /lib/systemd/system/telegraf.service else # Assuming sysv # Run update-rc.d or fallback to chkconfig if not available if which update-rc.d &>/dev/null; then disable_update_rcd else disable_chkconfig fi fi fi elif [[ -f /etc/os-release ]]; then source /etc/os-release if [[ $ID = "amzn" ]]; then # Amazon Linux logic if [[ "$1" = "0" ]]; then # InfluxDB is no longer installed, remove from init system rm -f /etc/default/telegraf disable_chkconfig fi fi fi S * L AA Y/?Y/?Y/?Y/?Y/?Y/?Y/?e8b654479dc3f727652531061f818f7a 154d53eb67bf9fd2d1fb91ab7b82c39d 59a0a85ba829600ed7b9388691723680 ac859a0cef245b2350ceac18c21034ea 5d49a6539596fda9d26a670096c5738b root root root root root root root root root root root root root root telegraf-1.3.1-1.src.rpm telegraf coreutils /bin/sh /bin/sh /bin/sh /bin/sh /bin/sh rpmlib(PayloadFilesHavePrefix) rpmlib(CompressedFileNames) 4.0-1 3.0.4-1 4.11.1 /bin/sh /bin/sh /bin/sh /bin/sh / 1.3.1-1 telegraf telegraf.conf telegraf.d telegraf init.sh telegraf.service telegraf /etc/logrotate.d/ /etc/telegraf/ /usr/bin/ /usr/lib/telegraf/scripts/ /var/log/ -O2 -g cpio gzip 9 %{_target_platform} #!/bin/bash BIN_DIR=/usr/bin LOG_DIR=/var/log/telegraf SCRIPT_DIR=/usr/lib/telegraf/scripts LOGROTATE_DIR=/etc/logrotate.d function install_init { cp -f $SCRIPT_DIR/init.sh /etc/init.d/telegraf chmod +x /etc/init.d/telegraf } function install_systemd { cp -f $SCRIPT_DIR/telegraf.service $1 systemctl enable telegraf || true systemctl daemon-reload || true } function install_update_rcd { update-rc.d telegraf defaults } function install_chkconfig { chkconfig --add telegraf } if ! grep "^telegraf:" /etc/group &>/dev/null; then groupadd -r telegraf fi if ! id telegraf &>/dev/null; then useradd -r -M telegraf -s /bin/false -d /etc/telegraf -g telegraf fi test -d $LOG_DIR || mkdir -p $LOG_DIR chown -R -L telegraf:telegraf $LOG_DIR chmod 755 $LOG_DIR # Remove legacy symlink, if it exists if [[ -L /etc/init.d/telegraf ]]; then rm -f /etc/init.d/telegraf fi # Remove legacy symlink, if it exists if [[ -L /etc/systemd/system/telegraf.service ]]; then rm -f /etc/systemd/system/telegraf.service fi # Add defaults file, if it doesn't exist if [[ ! -f /etc/default/telegraf ]]; then touch /etc/default/telegraf fi # Add .d configuration directory if [[ ! -d /etc/telegraf/telegraf.d ]]; then mkdir -p /etc/telegraf/telegraf.d fi # Distribution-specific logic if [[ -f /etc/redhat-release ]] || [[ -f /etc/SuSE-release ]]; then # RHEL-variant logic if [[ "$(readlink /proc/1/exe)" == */systemd ]]; then install_systemd /usr/lib/systemd/system/telegraf.service else # Assuming SysVinit install_init # Run update-rc.d or fallback to chkconfig if not available if which update-rc.d &>/dev/null; then install_update_rcd else install_chkconfig fi fi elif [[ -f /etc/debian_version ]]; then # Debian/Ubuntu logic if [[ "$(readlink /proc/1/exe)" == */systemd ]]; then install_systemd /lib/systemd/system/telegraf.service systemctl restart telegraf || echo "WARNING: systemd not running." else # Assuming SysVinit install_init # Run update-rc.d or fallback to chkconfig if not available if which update-rc.d &>/dev/null; then install_update_rcd else install_chkconfig fi invoke-rc.d telegraf restart fi elif [[ -f /etc/os-release ]]; then source /etc/os-release if [[ $ID = "amzn" ]]; then # Amazon Linux logic install_init # Run update-rc.d or fallback to chkconfig if not available if which update-rc.d &>/dev/null; then install_update_rcd else install_chkconfig fi /etc/init.d/telegraf restart fi fi /bin/sh ? p mpdu G3b,HLyzH5E BR~~%%:ڊ->ĥDő퍕Uvr%:%UWI)fnֱqĜ^H+NKCtw{˕2ي{>73ϳ׳!b5J=RoFR?_9|s~xn:o N3ܓ=߿ң{؋<nP?yxlcQ9={2">$>;Ζ