Skip to content

Commit 2cc9faf

Browse files
committed
fix last issues on scripts
1 parent f487fd9 commit 2cc9faf

File tree

10 files changed

+31
-16
lines changed

10 files changed

+31
-16
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,8 @@ tail -f /var/log/subvortex-auto-upgrader/subvortex-auto-upgrader.log
253253

254254
## 🐳 Run as Container <a id="run-as-container"></a>
255255

256+
> ⚠️ The Auto Upgrader is not yet available to run inside a Docker container. Please run it via `service` or `process`.
257+
256258
Before installing the Auto Upgrader as a container, be sure you have docker installed. If not, you can run
257259

258260
```bash
@@ -333,6 +335,8 @@ Unit subvortex-auto-upgrader.service could not be found.
333335

334336
## ❌ Remove Container <a id="remove-container"></a>
335337

338+
> ⚠️ The Auto Upgrader is not yet available to run inside a Docker container. Please run it via `service` or `process`.
339+
336340
To tear down the Auto Upgrader container:
337341

338342
```bash

scripts/auto_upgrader/auto_upgrader_setup.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,8 @@ fi
5959
setup_process() {
6060
echo "⚙️ Setting up for 'process' mode..."
6161

62-
# Install pm2
63-
./scripts/install_pm2.sh
64-
6562
# Setup the auto upgrade as process
66-
./subvortex/auto_upgrader/deployment/proecss/auto_upgrader_process_setup.sh
63+
./subvortex/auto_upgrader/deployment/process/auto_upgrader_process_setup.sh
6764

6865
# Add any other logic specific to process mode here
6966
echo "✅ Process setup complete."
@@ -99,7 +96,8 @@ run_setup() {
9996
setup_process
10097
;;
10198
container)
102-
setup_container
99+
# setup_container
100+
echo "⚠️ Auto Upgrader is not available to be run as container yet!"
103101
;;
104102
service)
105103
setup_service

scripts/auto_upgrader/auto_upgrader_start.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ setup_process() {
6666
echo "⚙️ Setting up for 'process' mode..."
6767

6868
# Start the auto upgrade as process
69-
./subvortex/auto_upgrader/deployment/proecss/auto_upgrader_process_start.sh
69+
./subvortex/auto_upgrader/deployment/process/auto_upgrader_process_start.sh
7070

7171
# Add any other logic specific to process mode here
7272
echo "✅ Process started."
@@ -105,7 +105,8 @@ run_setup() {
105105
setup_process
106106
;;
107107
container)
108-
setup_container
108+
# setup_container
109+
echo "⚠️ Auto Upgrader is not available to be run as container yet!"
109110
;;
110111
service)
111112
setup_service

scripts/auto_upgrader/auto_upgrader_stop.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ setup_process() {
4848
echo "⚙️ Setting up for 'process' mode..."
4949

5050
# Stop the auto upgrade as process
51-
./subvortex/auto_upgrader/deployment/proecss/auto_upgrader_process_stop.sh
51+
./subvortex/auto_upgrader/deployment/process/auto_upgrader_process_stop.sh
5252

5353
# Add any other logic specific to process mode here
5454
echo "✅ Process stopped."
@@ -83,7 +83,8 @@ run_setup() {
8383
setup_process
8484
;;
8585
container)
86-
setup_container
86+
# setup_container
87+
echo "⚠️ Auto Upgrader is not available to be run as container yet!"
8788
;;
8889
service)
8990
setup_service

scripts/auto_upgrader/auto_upgrader_teardown.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ setup_process() {
4848
echo "⚙️ Setting up for 'process' mode..."
4949

5050
# Teardown the auto upgrade as process
51-
./subvortex/auto_upgrader/deployment/proecss/auto_upgrader_process_teardown.sh
51+
./subvortex/auto_upgrader/deployment/process/auto_upgrader_process_teardown.sh
5252

5353
# Add any other logic specific to process mode here
5454
echo "✅ Process teardown complete."
@@ -83,7 +83,8 @@ run_setup() {
8383
setup_process
8484
;;
8585
container)
86-
setup_container
86+
# setup_container
87+
echo "⚠️ Auto Upgrader is not available to be run as container yet!"
8788
;;
8889
service)
8990
setup_service

scripts/auto_upgrader/auto_upgrader_upgrade.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ run_setup() {
101101
setup_process
102102
;;
103103
container)
104-
setup_container
104+
# setup_container
105+
echo "⚠️ Auto Upgrader is not available to be run as container yet!"
105106
;;
106107
service)
107108
setup_service

scripts/quick_start.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set -e
44

55
show_help() {
6-
echo "Usage: $0 [--execution=process|container|service]"
6+
echo "Usage: $0 [--execution=process|service]"
77
echo
88
echo "Options:"
99
echo " --execution Specify the execution method (default: service)"

scripts/quick_stop.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set -e
44

55
show_help() {
6-
echo "Usage: $0 [--execution=process|container|service]"
6+
echo "Usage: $0 [--execution=process|service]"
77
echo
88
echo "Options:"
99
echo " --execution Specify the execution method (default: service)"

subvortex/auto_upgrader/deployment/process/auto_upgrader_process_setup.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
set -e
44

5+
source ${BASH_SOURCE%/*}/../../../../scripts/utils/tools.sh
6+
7+
# Install pm2 if needed
8+
install_pm2
9+
510
# Determine script directory dynamically to ensure everything runs in ./scripts/api/
611
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
712
cd "$SCRIPT_DIR/../.."

subvortex/auto_upgrader/deployment/process/auto_upgrader_process_stop.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ SERVICE_NAME=subvortex-auto-upgrader
88
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
99
cd "$SCRIPT_DIR/../.."
1010

11-
# Start with PM2
12-
pm2 stop --name $SERVICE_NAME
11+
if pm2 list | grep -qw "$SERVICE_NAME"; then
12+
echo "🛑 Stopping PM2 service: $SERVICE_NAME"
13+
pm2 stop "$SERVICE_NAME"
14+
else
15+
echo "⚠️ PM2 service '$SERVICE_NAME' not found. Skipping stop."
16+
fi
1317

1418
echo "✅ Auto Upgrader stopped successfully"

0 commit comments

Comments
 (0)