status-go/_assets/systemd/gen_service.sh
Jakub Sokołowski c1f17cb4a3 use prometheus/client_golang for metrics
also re-implement mailserver metrics

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-11-04 13:18:50 +01:00

26 lines
535 B
Bash
Executable File

#!/usr/bin/env bash
GIT_ROOT=$(cd "${BASH_SOURCE%/*}" && git rev-parse --show-toplevel)
mkdir -p "${HOME}/.config/systemd/user"
cat >"${HOME}/.config/systemd/user/${SERVICE_NAME}.service" << EOF
[Unit]
Description=Status.im Mailserver Service
[Service]
Type=notify
Restart=on-failure
WatchdogSec=60s
WorkingDirectory=${DATA_PATH}
ExecStart=${GIT_ROOT}/build/bin/statusd \\
-log "${LOG_LEVEL}" \\
-log-without-color \\
-dir "${DATA_PATH}" \\
-c "./config.json" \\
-metrics
[Install]
WantedBy=default.target
EOF