diff --git a/s6/etc/cont-init.d/20-update b/s6/etc/cont-init.d/20-update index e5075fa..b5f4318 100755 --- a/s6/etc/cont-init.d/20-update +++ b/s6/etc/cont-init.d/20-update @@ -2,10 +2,7 @@ cd /pagermaid/workdir git remote set-url origin https://github.com/Xtao-Labs/PagerMaid-Modify.git -requir_old=$(cat requirements.txt) git pull -[[ $requir_old != $(cat requirements.txt) ]] && { - pip install -r requirements.txt - exit 0 -} \ No newline at end of file +pip install -r requirements.txt +exit 0 diff --git a/s6/etc/cont-init.d/40-redis b/s6/etc/cont-init.d/40-redis index 7ff0c62..fbc728a 100755 --- a/s6/etc/cont-init.d/40-redis +++ b/s6/etc/cont-init.d/40-redis @@ -1,7 +1,9 @@ #!/usr/bin/with-contenv bash -if [[ $RUN_AS_ROOT != true ]]; then - exec s6-setuidgid pagermaid redis-server --daemonize yes -else - redis-server --daemonize yes -fi \ No newline at end of file +perl -i -pe "{ + s|^dir /var/lib/redis|dir /pagermaid/workdir|; + s|^save \d+ 1|save 60 1|; + }" /etc/redis/redis.conf + +cd /pagermaid/workdir +redis-server /etc/redis/redis.conf \ No newline at end of file diff --git a/s6/etc/services.d/pagermaid/run b/s6/etc/services.d/pagermaid/run index 854663f..51dd952 100755 --- a/s6/etc/services.d/pagermaid/run +++ b/s6/etc/services.d/pagermaid/run @@ -4,6 +4,6 @@ cd /pagermaid/workdir if [[ $RUN_AS_ROOT != true ]]; then exec s6-setuidgid pagermaid python -m pagermaid else - python -m pagermaid + exec s6-setuidgid root python -m pagermaid fi