mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-04-19 19:14:51 +00:00
Fix ownership check in docker entrypoint script
This commit is contained in:
parent
78dd5b6489
commit
c48da8ccd7
1 changed files with 4 additions and 4 deletions
|
@ -1,11 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
log() {
|
||||
local type="$1"; shift
|
||||
type="$1"; shift
|
||||
printf '%s [%s] [Entrypoint]: %s\n' "$(date -Iseconds)" "$type" "$*"
|
||||
}
|
||||
|
||||
log Note "Entrypoint script for Lighthouse $SERVER started".
|
||||
log Note "Entrypoint script for Lighthouse $SERVER started"
|
||||
|
||||
if [ ! -d "/lighthouse/data" ]; then
|
||||
log Note "Creating data directory"
|
||||
|
@ -13,7 +13,7 @@ if [ ! -d "/lighthouse/data" ]; then
|
|||
fi
|
||||
|
||||
owner=$(stat -c "%U %G" /lighthouse/data)
|
||||
if [ owner != "lighthouse lighthouse" ]; then
|
||||
if [ "$owner" != "lighthouse lighthouse" ]; then
|
||||
log Note "Changing ownership of data directory"
|
||||
chown -R lighthouse:lighthouse /lighthouse/data
|
||||
fi
|
||||
|
@ -27,7 +27,7 @@ fi
|
|||
# Start server
|
||||
|
||||
log Note "Startup tasks finished, starting $SERVER..."
|
||||
cd /lighthouse/data
|
||||
cd /lighthouse/data || exit
|
||||
exec su-exec lighthouse:lighthouse dotnet /lighthouse/app/LBPUnion.ProjectLighthouse.Servers."$SERVER".dll
|
||||
|
||||
exit $? # Expose error code from dotnet command
|
Loading…
Add table
Reference in a new issue