Fix setup_systemd.sh copy issue when running from install dir
This commit is contained in:
parent
270e47f9a6
commit
764aa183dd
@ -104,11 +104,15 @@ echo "📁 Setting up installation directory..."
|
|||||||
mkdir -p "$INSTALL_DIR"/{bin,data,configs,logs,backups,web}
|
mkdir -p "$INSTALL_DIR"/{bin,data,configs,logs,backups,web}
|
||||||
mkdir -p "$INSTALL_DIR/data"/{blobs,chunks,transcoded,thumbnails,metadata}
|
mkdir -p "$INSTALL_DIR/data"/{blobs,chunks,transcoded,thumbnails,metadata}
|
||||||
|
|
||||||
# Copy files
|
# Copy files (only if not already in install directory)
|
||||||
|
if [ "$PWD" != "$INSTALL_DIR" ]; then
|
||||||
cp bin/gateway "$INSTALL_DIR/bin/"
|
cp bin/gateway "$INSTALL_DIR/bin/"
|
||||||
cp -r configs/* "$INSTALL_DIR/configs/" 2>/dev/null || true
|
cp -r configs/* "$INSTALL_DIR/configs/" 2>/dev/null || true
|
||||||
cp -r internal/web "$INSTALL_DIR/"
|
cp -r internal/web "$INSTALL_DIR/"
|
||||||
cp -r scripts "$INSTALL_DIR/"
|
cp -r scripts "$INSTALL_DIR/"
|
||||||
|
else
|
||||||
|
echo "ℹ️ Already running from install directory, skipping copy"
|
||||||
|
fi
|
||||||
|
|
||||||
# Set permissions
|
# Set permissions
|
||||||
chown -R "$SERVICE_USER:$SERVICE_GROUP" "$INSTALL_DIR"
|
chown -R "$SERVICE_USER:$SERVICE_GROUP" "$INSTALL_DIR"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user