Skip to content

Commit

Permalink
Make systemd-tmpfiles optional (#3435)
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Nasiadka <[email protected]>
  • Loading branch information
mnasiadka authored May 5, 2023
1 parent 3dc23d7 commit 6bbc227
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ if command -v systemctl > /dev/null; then
fi

# Reload other configs
systemd-tmpfiles --create opensearch-dashboards.conf
if command -v systemd-tmpfiles > /dev/null; then
systemd-tmpfiles --create opensearch-dashboards.conf
fi

# Messages
echo "### NOT starting on installation, please execute the following statements to configure opensearch-dashboards service to start automatically using systemd"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ if command -v systemctl > /dev/null; then
systemctl daemon-reload
fi
# Reload other configs
systemd-tmpfiles --create %{name}.conf
if command -v systemd-tmpfiles > /dev/null; then
systemd-tmpfiles --create %{name}.conf
fi
# Messages
echo "### NOT starting on installation, please execute the following statements to configure opensearch-dashboards service to start automatically using systemd"
echo " sudo systemctl daemon-reload"
Expand Down
5 changes: 4 additions & 1 deletion scripts/pkg/build_templates/opensearch/deb/debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ fi
if command -v systemctl > /dev/null; then
systemctl restart systemd-sysctl.service || true
fi
systemd-tmpfiles --create opensearch.conf

if command -v systemd-tmpfiles > /dev/null; then
systemd-tmpfiles --create opensearch.conf
fi

# Messages
echo "### NOT starting on installation, please execute the following statements to configure opensearch service to start automatically using systemd"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,11 @@ fi
if command -v systemctl > /dev/null; then
systemctl restart systemd-sysctl.service || true
fi
systemd-tmpfiles --create %{name}.conf

if command -v systemd-tmpfiles > /dev/null; then
systemd-tmpfiles --create %{name}.conf
fi

# Messages
echo "### NOT starting on installation, please execute the following statements to configure opensearch service to start automatically using systemd"
echo " sudo systemctl daemon-reload"
Expand Down

0 comments on commit 6bbc227

Please sign in to comment.