-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sync with Extension:CollabPads@REL1_39-1.0.x
- Loading branch information
Robert Vogel
committed
Nov 15, 2024
1 parent
d98aa2d
commit 1c2801c
Showing
33 changed files
with
2,012 additions
and
188 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/composer.lock | ||
/package-lock.json | ||
vendor/ | ||
node_modules/ | ||
mongo/ | ||
config.php | ||
.env |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash | ||
|
||
PHP_BIN=/usr/local/bin/php | ||
SERVER_SCRIPT=./bin/server.php | ||
PID_FILE=/tmp/server.pid | ||
|
||
start_server() { | ||
# Log output to stdout | ||
$PHP_BIN $SERVER_SCRIPT & | ||
echo $! > $PID_FILE | ||
} | ||
|
||
is_server_running() { | ||
if [ -f $PID_FILE ]; then | ||
PID=`cat $PID_FILE` | ||
if ps -p $PID > /dev/null; then | ||
return 0 | ||
else | ||
return 1 | ||
fi | ||
else | ||
return 1 | ||
fi | ||
} | ||
|
||
restart_server() { | ||
printf "Server is not running, restarting...\n" | ||
start_server | ||
} | ||
|
||
monitor_server() { | ||
while true; do | ||
is_server_running | ||
if [ $? -eq 0 ]; then | ||
sleep 1 | ||
else | ||
restart_server | ||
fi | ||
done | ||
} | ||
|
||
# Start the server | ||
printf "Starting the server...\n" | ||
start_server | ||
# Monitor the server | ||
monitor_server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.