From fd04b3364f7e849a21610e2c6fd0104827ad0629 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Fri, 19 Aug 2022 13:48:01 +0200 Subject: [PATCH] scripts/install_linux.sh install systemd/init.d config file in /etc/default/eosio-api-healthcheck instead of /etc/eosio-api-healthcheck/env Its the standard way for init.d but alot of systemd services uses it also. --- scripts/install_linux.sh | 8 ++++---- scripts/templates/config | 2 +- scripts/templates/sysunit.service | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/install_linux.sh b/scripts/install_linux.sh index c190202..a5d882e 100755 --- a/scripts/install_linux.sh +++ b/scripts/install_linux.sh @@ -16,12 +16,12 @@ cat ${TEMPLATE_DIR}/sysunit.service \ | sed "s~{{ PROGRAM }}~${BINDIR}/${PROGRAM_NAME}~" \ > ${SYSUNITDIR}/${PROGRAM_NAME}.service -# Create systemd config file -log_install ${DESTDIR}${ETCDIR}/env -mkdir -p ${DESTDIR}${ETCDIR} +# Create systemd/init.d config file +log_install ${DESTDIR}/etc/default/${PROGRAM_NAME} +mkdir -p ${DESTDIR}/etc/default cat ${TEMPLATE_DIR}/config \ | sed "s~{{ PROGRAM_NAME }}~${PROGRAM_NAME}~" \ - > ${DESTDIR}${ETCDIR}/env + > ${DESTDIR}/etc/default/${PROGRAM_NAME} # Create rsyslog file log_install ${RSYSLOGDIR}/49-${PROGRAM_NAME}.conf diff --git a/scripts/templates/config b/scripts/templates/config index 6ddab53..507377b 100644 --- a/scripts/templates/config +++ b/scripts/templates/config @@ -1,6 +1,6 @@ # Default settings for {{ PROGRAM_NAME }} # -# This is sourced by the systemd unit file. +# This is sourced by the systemd unit file or init.d # Command line flags to pass to {{ PROGRAM_NAME }} # First is IP to listen to, second is port. diff --git a/scripts/templates/sysunit.service b/scripts/templates/sysunit.service index 44d356e..c241166 100644 --- a/scripts/templates/sysunit.service +++ b/scripts/templates/sysunit.service @@ -3,7 +3,7 @@ Description={{ DESCRIPTION }} After=network.target [Service] -EnvironmentFile=-/etc/{{ PROGRAM_NAME }}/env +EnvironmentFile=-/etc/default/{{ PROGRAM_NAME }} Type=simple ExecStart={{ PROGRAM }} $OPTS Restart=on-failure