Compare commits
1 commit
stable
...
use-sudo_u
Author | SHA1 | Date | |
---|---|---|---|
738f2682b0 |
|
@ -24,13 +24,14 @@ The **patch** part changes is incremented if multiple releases happen the same m
|
||||||
* mongodb: Deny the install on Debian 11 « Bullseye » when the version is unsupported
|
* mongodb: Deny the install on Debian 11 « Bullseye » when the version is unsupported
|
||||||
* mongodb: Support version 5.0 (for buster)
|
* mongodb: Support version 5.0 (for buster)
|
||||||
* mongodb: Allow to specify a mongodb version for buster & bullseye
|
* mongodb: Allow to specify a mongodb version for buster & bullseye
|
||||||
|
* packweb-apache: phpContainer now use $SUDO\_USER when available (so when run through sudo or as an unprivileged user) and $LOGNAME when not.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
* evolinux-base: fix alert5.service dependency syntax
|
* evolinux-base: fix alert5.service dependency syntax
|
||||||
* mysql : Create a default ~root/.my.cnf for compatibility reasons
|
* mysql : Create a default ~root/.my.cnf for compatibility reasons
|
||||||
* nginx : fix variable name and debug to actually use nginx-light
|
* nginx : fix variable name and debug to actually use nginx-light
|
||||||
* packweb-apache : Support php 8.0
|
* packweb-apache : Support php 8.0
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
|
|
||||||
Defaults env_keep += "LOGNAME PWD"
|
Defaults env_keep += "PWD"
|
||||||
ALL ALL = NOPASSWD: /usr/local/bin/phpContainer
|
ALL ALL = NOPASSWD: /usr/local/bin/phpContainer
|
||||||
|
|
|
@ -6,10 +6,10 @@ if [ "$EUID" -ne 0 ]; then
|
||||||
exit 0;
|
exit 0;
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
PHPVersion=$(grep SetHandler /etc/apache2/sites-enabled/$LOGNAME.conf 2>/dev/null | grep -m 1 -o 'fpm[0-9][0-9]' | head -n 1 | sed 's/php//g' | sed 's/fpm//g')
|
PHPVersion=$(grep SetHandler /etc/apache2/sites-enabled/${SUDO_USER:-${LOGNAME}}.conf 2>/dev/null | grep -m 1 -o 'fpm[0-9][0-9]' | head -n 1 | sed 's/php//g' | sed 's/fpm//g')
|
||||||
|
|
||||||
if [ "$PHPVersion" != "" ]; then
|
if [ "$PHPVersion" != "" ]; then
|
||||||
lxc-attach -n php$PHPVersion -- su - $LOGNAME -c "cd \"${PWD@E}\" && php ${*@Q}"
|
lxc-attach -n php$PHPVersion -- su - ${SUDO_USER:-${LOGNAME}} -c "cd \"${PWD@E}\" && php ${*@Q}"
|
||||||
else
|
else
|
||||||
# TODO: fallback?
|
# TODO: fallback?
|
||||||
# command php $*
|
# command php $*
|
||||||
|
|
Loading…
Reference in a new issue