Skip to content

Commit

Permalink
Stop services on shutdown
Browse files Browse the repository at this point in the history
Signed-off-by: Ethan Dye <[email protected]>
  • Loading branch information
ecdye committed Dec 18, 2024
1 parent 02e88d0 commit 12db4c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zram-config
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ removeZdir() {
removeZswap() {
log "INFO" "Beginning removal of swap device."

if [[ -z $SHUTDOWN ]] && swapoff "/dev${ZRAM_DEV}" &> /dev/null; then
if [[ -z $SHUTDOWN ]] && ! swapoff "/dev${ZRAM_DEV}" &> /dev/null; then
log "ERROR" "Failed to swapoff /dev${ZRAM_DEV}."
return 1
fi
Expand Down Expand Up @@ -420,7 +420,7 @@ case "$1" in
ZRAM_DEV="$2"
TARGET_DIR="$3"
BIND_DIR="$4"
[[ -z $SHUTDOWN ]] && serviceConfiguration "stop"
serviceConfiguration "stop"
removeZdir
;;
esac
Expand Down

0 comments on commit 12db4c2

Please sign in to comment.