diff --git a/scripts/deb/post-install.sh b/scripts/deb/post-install.sh index d7d23883e21b9..bdd79f79182f1 100644 --- a/scripts/deb/post-install.sh +++ b/scripts/deb/post-install.sh @@ -57,6 +57,7 @@ test -d "$STATE_DIR" || { STATE_FILE="$STATE_DIR/statefile" test -f "$STATE_FILE" || { touch "$STATE_FILE" + echo {} > "$STATE_FILE" chown root:telegraf "$STATE_FILE" chmod 660 "$STATE_FILE" } diff --git a/scripts/rpm/post-install.sh b/scripts/rpm/post-install.sh index a6f05754a883c..bd88343b5b192 100644 --- a/scripts/rpm/post-install.sh +++ b/scripts/rpm/post-install.sh @@ -36,6 +36,7 @@ test -d "$STATE_DIR" || { STATE_FILE="$STATE_DIR/statefile" test -f "$STATE_FILE" || { touch "$STATE_FILE" + echo {} > "$STATE_FILE" chown root:telegraf "$STATE_FILE" chmod 660 "$STATE_FILE" }