Skip to content

Commit

Permalink
feat: added better ordering to systemd tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
Tbaile committed Feb 26, 2024
1 parent 7e5bcdf commit 2545e08
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 1 addition & 3 deletions imageroot/actions/configure-module/20systemd
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
# SPDX-License-Identifier: GPL-3.0-or-later
#

install -m 644 "${AGENT_INSTALL_DIR}/dnsmasq.service" "/etc/systemd/system/${MODULE_ID}.service"
systemctl daemon-reload
# OPs are separated due to restart
systemctl enable "${MODULE_ID}.service"
# allow the reload of configuration even if
systemctl restart "${MODULE_ID}.service"
5 changes: 4 additions & 1 deletion imageroot/actions/create-module/10setup
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@
#

# Create the dnsmasq.d directory
mkdir -p "${AGENT_INSTALL_DIR}/dnsmasq.d"
mkdir -p "dnsmasq.d"
# Install systemd service
install -m 644 "${AGENT_INSTALL_DIR}/dnsmasq.service" "/etc/systemd/system/${MODULE_ID}.service"
systemctl daemon-reload
2 changes: 1 addition & 1 deletion imageroot/actions/destroy-module/20systemd
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
#

systemctl disable --now "${MODULE_ID}.service"
systemctl daemon-reload
rm -f "/etc/systemd/system/${MODULE_ID}.service"
systemctl daemon-reload

0 comments on commit 2545e08

Please sign in to comment.