Skip to content

Commit

Permalink
Add destroy-module action for systemd cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
stephdl committed Mar 10, 2024
1 parent 9185994 commit c098487
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions imageroot/actions/destroy-module/30systemd
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

#
# Copyright (C) 2024 Nethesis S.r.l.
# SPDX-License-Identifier: GPL-3.0-or-later
#

exec 1>&2 # Send any output to stderr, to not alter the action response protocol
set -e

#
# We must stop and clean up what we installed in the "create-module" action
#
systemctl disable --now "${MODULE_ID}.service"
rm -vf "/etc/systemd/system/${MODULE_ID}.service"

systemctl daemon-reload

0 comments on commit c098487

Please sign in to comment.