2019-09-16 09:38:33 +00:00
|
|
|
#!/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}" \\
|
2019-10-22 17:32:05 +00:00
|
|
|
-c "./config.json" \\
|
|
|
|
-metrics
|
2019-09-16 09:38:33 +00:00
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=default.target
|
|
|
|
EOF
|