We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9b848fb commit 3b8271fCopy full SHA for 3b8271f
2 files changed
src/backend/shell_scripts/restart.sh
@@ -0,0 +1,15 @@
1
+#!/bin/bash
2
+
3
+# This script takes in 1 command line argument (the container name)
4
5
+id -u
6
+if [ "$#" -ne 1 ]; then
7
+ echo "Usage: $0 container_name"
8
+ exit 1
9
+fi
10
11
+arg1=$1
12
13
+echo "Restarting... $arg1"
14
15
+sudo docker restart $arg1
src/backend/utils/auto-restart.ts
@@ -9,7 +9,7 @@ export function getRestartCount(containerName: string): number {
export async function restartContainer(containerName: string): Promise<void> {
try {
await exec(
- `bash -c "echo 'docker restart ${containerName}' > /hostpipe/pipe"`
+ `bash -c "echo 'bash ../../src/backend/shell_scripts/restart.sh ${containerName}' > /hostpipe/pipe"`
);
const current = restartCounts.get(containerName);
0 commit comments