Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
alihm committed Mar 4, 2024
1 parent 27ef0be commit 4f49158
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions php-fpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,24 @@
pidfile="/usr/local/bin/php-fpm-pid"
# Start the process
php-fpm -g $pidfile &
# Wait for 10 seconds
sleep 10
# Wait for 5 seconds
sleep 5
# Kill the process
pid=$(cat $pidfile)
kill $pid
sleep 5
# loop that resests php-fpm and folder permissions each 30 minutes
while true; do

# Start the process
php-fpm -g $pidfile &
# Wait for 30 minutes

# reset wp folder permissions
chmod -R g+rwx /var/www/html/
chown -R www-data:www-data /var/www/html/
echo "Reseted Permissions."
# Wait for 30 minutes
sleep 1800
# Kill the process
pid=$(cat $pidfile)
#kill $pid

kill $pid
done

0 comments on commit 4f49158

Please sign in to comment.