Skip to content

Commit

Permalink
fix(statefile): Ensure valid statefile (#14937)
Browse files Browse the repository at this point in the history
  • Loading branch information
powersj committed Mar 5, 2024
1 parent 5aaea99 commit 8a16162
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions scripts/deb/post-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
1 change: 1 addition & 0 deletions scripts/rpm/post-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down

0 comments on commit 8a16162

Please sign in to comment.