1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-api-healthcheck synced 2026-08-29 21:18:12 +02:00

deb package: adding environment file for systemctl

This commit is contained in:
Henrik Hautakoski 2020-02-03 19:36:06 +01:00
parent 90b559a518
commit c926b4b5e5
3 changed files with 16 additions and 1 deletions

View file

@ -30,10 +30,17 @@ cat ${BASE_DIR}/${PACKAGE_TMPDIR}/DEBIAN/control
# Create service file
mkdir -p ${BASE_DIR}/${PACKAGE_TMPDIR}/etc/systemd/system
cat ${BASE_DIR}/template.service \
| sed "s~{{ PACKAGE_NAME }}~${PACKAGE_NAME}~" \
| sed "s~{{ DESCRIPTION }}~${PACKAGE_DESCRIPTION}~" \
| sed "s~{{ PROGRAM }}~/${PACKAGE_PREFIX}/bin/${PACKAGE_NAME}~" \
> ${BASE_DIR}/${PACKAGE_TMPDIR}/etc/systemd/system/${PACKAGE_NAME}.service
# Cerate config file
mkdir -p ${BASE_DIR}/${PACKAGE_TMPDIR}/etc/${PACKAGE_NAME}
cat ${BASE_DIR}/config \
| sed "s~{{ PACKAGE_NAME }}~${PACKAGE_NAME}~" \
> ${BASE_DIR}/${PACKAGE_TMPDIR}/etc/${PACKAGE_NAME}/env
# Copy program
mkdir -p ${BASE_DIR}/${PACKAGE_TMPDIR}/${PACKAGE_PREFIX}/bin
cp ${BASE_DIR}/../${PACKAGE_PROGRAM} ${BASE_DIR}/${PACKAGE_TMPDIR}/${PACKAGE_PREFIX}/bin/${PACKAGE_NAME}