From f8038836ea03170d7347f30da47c376728811dc4 Mon Sep 17 00:00:00 2001 From: Marc Cataford Date: Sun, 31 Mar 2024 14:59:49 -0400 Subject: [PATCH] refactor(deluge): extract into own pod --- services/deluge/start.sh | 22 ++++++++++++++-------- services/deluge/stop.sh | 4 +--- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/services/deluge/start.sh b/services/deluge/start.sh index 6b834a6..5d0cd32 100644 --- a/services/deluge/start.sh +++ b/services/deluge/start.sh @@ -2,14 +2,20 @@ source constants.sh +podman pod create \ + -p 8112:8112 \ + --replace \ + "deluge" + podman run \ - --detach \ - --pod services \ + -d \ + --pod "deluge" \ -e PGUID=1000 \ -e PGID=1000 \ - --name $APP_CONTAINER_NAME \ - --env-file $ENV_FILE_DIR/deluge.env \ - --mount type=bind,source=$APP_DATA_DIR/deluge/config,target=/config \ - --mount type=bind,source=$APP_DATA_DIR/deluge/downloads,target=/downloads \ - --mount type=bind,source=$STORAGE_DIR,target=/complete \ - $APP_IMAGE_NAME:$IMAGE_VERSION + --name "$APP_CONTAINER_NAME" \ + --env-file "$ENV_FILE_DIR"/deluge.env \ + --mount type=bind,source="$APP_DATA_DIR"/deluge/config,target=/config \ + --mount type=bind,source="$APP_DATA_DIR"/deluge/downloads,target=/downloads \ + --mount type=bind,source="$STORAGE_DIR",target=/complete \ + --replace \ + "$APP_IMAGE_NAME:$IMAGE_VERSION" diff --git a/services/deluge/stop.sh b/services/deluge/stop.sh index 78156cb..05bec24 100644 --- a/services/deluge/stop.sh +++ b/services/deluge/stop.sh @@ -1,5 +1,3 @@ #!/bin/bash -source constants.sh - -podman rm -f $APP_CONTAINER_NAME +podman pod stop "deluge"