Skip to content
Snippets Groups Projects
Commit 406e980f authored by Eugene Dementiev's avatar Eugene Dementiev Committed by Cameron Sparr
Browse files

install and init script for el5

Fixes #186
Closes #203
parent 21106556
No related branches found
No related tags found
No related merge requests found
#! /usr/bin/env bash #! /usr/bin/env bash
# chkconfig: 2345 99 01
# description: Telegraf daemon
### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: telegraf # Provides: telegraf
# Required-Start: $all # Required-Start: $all
......
...@@ -160,7 +160,14 @@ rm -f $INSTALL_ROOT_DIR/init.sh ...@@ -160,7 +160,14 @@ rm -f $INSTALL_ROOT_DIR/init.sh
ln -sfn $INSTALL_ROOT_DIR/versions/$version/telegraf $INSTALL_ROOT_DIR/telegraf ln -sfn $INSTALL_ROOT_DIR/versions/$version/telegraf $INSTALL_ROOT_DIR/telegraf
if ! id telegraf >/dev/null 2>&1; then if ! id telegraf >/dev/null 2>&1; then
useradd --help 2>&1| grep -- --system > /dev/null 2>&1
old_useradd=\$?
if [[ \$old_useradd == 0 ]]
then
useradd --system -U -M telegraf useradd --system -U -M telegraf
else
groupadd telegraf && useradd -M -g telegraf telegraf
fi
fi fi
# Systemd # Systemd
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment