#!/bin/bash # Copyright OpenSearch Contributors # SPDX-License-Identifier: Apache-2.0 # # The OpenSearch Contributors require contributions made to # this file be licensed under the Apache-2.0 license or a # compatible open source license. # deb opensearch-dashboards postinst script set -e echo "Running OpenSearch-Dashboards Post-Installation Script" product_dir=/usr/share/opensearch-dashboards config_dir=/etc/opensearch-dashboards data_dir=/var/lib/opensearch-dashboards log_dir=/var/log/opensearch-dashboards pid_dir=/var/run/opensearch-dashboards # Reload systemctl daemon if command -v systemctl > /dev/null; then systemctl daemon-reload fi # Reload other configs 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" echo " sudo systemctl daemon-reload" echo " sudo systemctl enable opensearch-dashboards.service" echo "### You can start opensearch-dashboards service by executing" echo " sudo systemctl start opensearch-dashboards.service" # Set owner chown -R opensearch-dashboards.opensearch-dashboards ${product_dir} chown -R opensearch-dashboards.opensearch-dashboards ${config_dir} chown -R opensearch-dashboards.opensearch-dashboards ${log_dir} chown -R opensearch-dashboards.opensearch-dashboards ${data_dir} chown -R opensearch-dashboards.opensearch-dashboards ${pid_dir} exit 0