Fix running extension script without root privilages
This commit is contained in:
parent
839e8a2366
commit
88a47c4231
1 changed files with 2 additions and 2 deletions
|
@ -365,8 +365,8 @@ if [[ ( $2 == "-i" ) || ( $2 == "-install" ) ]]; then
|
||||||
|
|
||||||
if [[ $flags == *"-run.afterinstall;"* ]]; then
|
if [[ $flags == *"-run.afterinstall;"* ]]; then
|
||||||
if [[ $(whoami) == "root" ]]; then
|
if [[ $(whoami) == "root" ]]; then
|
||||||
log_red "Custom extension installation script will not be ran as root for safety reasons. Running as 'www:data' instead.."
|
log_red "Custom extension installation script will not be ran as root for safety reasons. Running as 'www-data' instead.."
|
||||||
sudo -u www:data .blueprint/.storage/extensiondata/$identifier/install.sh;
|
sudo -u www-data .blueprint/.storage/extensiondata/$identifier/install.sh;
|
||||||
else
|
else
|
||||||
log_red "Running custom extension installation script.."
|
log_red "Running custom extension installation script.."
|
||||||
bash .blueprint/.storage/extensiondata/$identifier/install.sh;
|
bash .blueprint/.storage/extensiondata/$identifier/install.sh;
|
||||||
|
|
Loading…
Reference in a new issue