mirror of
https://github.com/standardebooks/web.git
synced 2025-07-07 07:10:29 -04:00
Expand some scripted command arguments
This commit is contained in:
parent
e6d4ea1ab6
commit
30f2925046
2 changed files with 8 additions and 6 deletions
|
@ -22,7 +22,8 @@ if [ $# -ne 1 ]; then
|
|||
usage
|
||||
fi
|
||||
|
||||
# If this script is run by a user without sudo powers, they can be given permission to run this command by creating a file in sudoers.d with:
|
||||
# If this script is run by a user without sudo powers, they can be given permission to run this command by creating a file in `sudoers.d` with:
|
||||
#
|
||||
# MY_USERNAME ALL=(www-data) NOPASSWD: /usr/bin/env SCRIPT_FILENAME=/tmp/rebuild-cache.php REQUEST_METHOD=GET cgi-fcgi -bind -connect *
|
||||
|
||||
type="$1"
|
||||
|
@ -35,5 +36,5 @@ if [ "${type}" = "feeds" ]; then
|
|||
echo "<?php require_once('Core.php'); Feed::RebuildFeedsCache(); ?>" > /tmp/rebuild-cache.php
|
||||
fi
|
||||
|
||||
sudo -u www-data env SCRIPT_FILENAME=/tmp/rebuild-cache.php REQUEST_METHOD=GET cgi-fcgi -bind -connect "/run/php/standardebooks.org.sock" &> /dev/null
|
||||
sudo --user=www-data env SCRIPT_FILENAME=/tmp/rebuild-cache.php REQUEST_METHOD=GET cgi-fcgi -bind -connect "/run/php/standardebooks.org.sock" &> /dev/null
|
||||
rm /tmp/rebuild-cache.php
|
||||
|
|
|
@ -22,9 +22,10 @@ if [ $# -ne 1 ]; then
|
|||
usage
|
||||
fi
|
||||
|
||||
# If this script is run by a user without sudo powers, they can be given for this command by creating a file in sudoers.d with:
|
||||
# If this script is run by a user without sudo powers, they can be given for this command by creating a file in `sudoers.d` with:
|
||||
#
|
||||
# MY_USERNAME ALL=(www-data) NOPASSWD: /usr/bin/env SCRIPT_FILENAME=/tmp/php-fpm-opcache-reset.php REQUEST_METHOD=GET cgi-fcgi -bind -connect *
|
||||
|
||||
echo '<?php opcache_reset();?>' > /tmp/php-fpm-opcache-reset.php
|
||||
sudo -u www-data env SCRIPT_FILENAME=/tmp/php-fpm-opcache-reset.php REQUEST_METHOD=GET cgi-fcgi -bind -connect "/run/php/$1.sock" &> /dev/null
|
||||
sudo --user www-data env SCRIPT_FILENAME=/tmp/php-fpm-opcache-reset.php REQUEST_METHOD=GET cgi-fcgi -bind -connect "/run/php/$1.sock" &> /dev/null
|
||||
rm /tmp/php-fpm-opcache-reset.php
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue