Skip to content

Commit

Permalink
Test for file existance before removing mojo/minion/shinobu pid files (
Browse files Browse the repository at this point in the history
  • Loading branch information
okaros authored Nov 9, 2024
1 parent a1c515d commit 2ad6772
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions tools/build/docker/s6/cont-init.d/01-lrr-setup
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,21 @@ chown -R koyomi /home/koyomi/lanraragi/public/temp
chmod u+rwx /home/koyomi/lanraragi/public/temp

#Remove mojo, minion and shinobu pid files
rm /home/koyomi/lanraragi/public/temp/server.pid
rm /home/koyomi/lanraragi/public/temp/shinobu.pid
rm /home/koyomi/lanraragi/public/temp/shinobu.pid-s6
rm /home/koyomi/lanraragi/public/temp/minion.pid
rm /home/koyomi/lanraragi/public/temp/minion.pid-s6
if [ -f /home/koyomi/lanraragi/public/temp/server.pid ]; then
rm /home/koyomi/lanraragi/public/temp/server.pid
fi
if [ -f /home/koyomi/lanraragi/public/temp/shinobu.pid ]; then
rm /home/koyomi/lanraragi/public/temp/shinobu.pid
fi
if [ -f /home/koyomi/lanraragi/public/temp/shinobu.pid-s6 ]; then
rm /home/koyomi/lanraragi/public/temp/shinobu.pid-s6
fi
if [ -f /home/koyomi/lanraragi/public/temp/minion.pid ]; then
rm /home/koyomi/lanraragi/public/temp/minion.pid
fi
if [ -f /home/koyomi/lanraragi/public/temp/minion.pid-s6 ]; then
rm /home/koyomi/lanraragi/public/temp/minion.pid-s6
fi

# https://redis.io/topics/faq#background-saving-fails-with-a-fork-error-under-linux-even-if-i-have-a-lot-of-free-ram
OVERCOMMIT=$(cat /proc/sys/vm/overcommit_memory)
Expand Down

0 comments on commit 2ad6772

Please sign in to comment.