Skip to content

Commit

Permalink
修复空目录不存在导致的异常
Browse files Browse the repository at this point in the history
  • Loading branch information
taksssss committed Aug 27, 2024
1 parent 5daa5b2 commit 002ba56
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: Docker Image CI

on:
workflow_dispatch: # 允许手动触发
workflow_dispatch: # 允许手动触发
push: # 允许推送触发
branches:
- main

jobs:
build:
Expand Down
9 changes: 4 additions & 5 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,17 @@ sed -i 's/#LoadModule\ expires_module/LoadModule\ expires_module/' /etc/apache2/
sed -i "s/memory_limit = .*/memory_limit = ${PHP_MEMORY_LIMIT}/" /etc/php83/php.ini
sed -i "s#^;date.timezone =\$#date.timezone = \"${TZ}\"#" /etc/php83/php.ini


# Change ownership of /htdocs/epg
chown -R apache:apache /htdocs/epg

# Check if /htdocs/epg/data/config.json exists
echo 'Checking if /htdocs/epg/data/config.json exists'
if [ ! -f /htdocs/epg/data/config.json ]; then
echo 'config.json not found, copying default config'
# If it does not exist, use config_default.json
cp /htdocs/epg/config_default.json /htdocs/epg/data/config.json
mkdir -p /htdocs/epg/data && cp -p /htdocs/epg/config_default.json /htdocs/epg/data/config.json
fi

# Change ownership of /htdocs/epg
chown -R apache:apache /htdocs/epg

echo 'Running cron.php and Apache'

# Start cron.php
Expand Down

0 comments on commit 002ba56

Please sign in to comment.