Skip to content

Commit

Permalink
ci: launch server if not running
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgomesdev committed Jul 6, 2024
1 parent 3613378 commit 6485980
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions server/scripts/auto-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,14 @@ if [[ -f "$HASH_FILE" ]]; then
else
echo "$INFO* Version is already up-to-date.$RESET"

tmux has-session -t "RustyController" 2>/dev/null
if [ $? != 0 ]; then
printf "\n${INFO}Server is not running$RESET\n\n"
launch
fi

if [[ "$LAUNCH_ALWAYS" == "y" ]]; then
printf "\n${INFO}Launching due to always launch flag$RESET\n\n"
launch
fi
fi
Expand Down
2 changes: 1 addition & 1 deletion server/scripts/launch-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ if [[ ! $ARE_PLUGINS_UPDATED ]]; then
else
tmux has-session -t "RustyController plugins" 2>/dev/null
if [ $? != 0 ]; then
printf "\n${INFO}Plugins are not running, running...$RESET\n\n"
printf "\n${INFO}Plugins are not running, launching...$RESET\n\n"
bash run-all.sh
else
printf "\n${INFO}Plugins are up-to-date$RESET\n\n"
Expand Down

0 comments on commit 6485980

Please sign in to comment.