Fix running extension script without root privilages

This commit is contained in:
purple 2023-05-30 20:36:51 +02:00 committed by GitHub
parent 839e8a2366
commit 88a47c4231
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -365,8 +365,8 @@ if [[ ( $2 == "-i" ) || ( $2 == "-install" ) ]]; then
if [[ $flags == *"-run.afterinstall;"* ]]; 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.."
sudo -u www:data .blueprint/.storage/extensiondata/$identifier/install.sh;
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;
else
log_red "Running custom extension installation script.."
bash .blueprint/.storage/extensiondata/$identifier/install.sh;