Commit 72ceed9f authored by mh's avatar mh
Browse files

use the scl for the wordpress upgrade if the hosting is using one

parent 3adf8f46
......@@ -73,7 +73,12 @@ def upgrade_wordpress(wd)
# run the upgrade as sftp user
log "Running the upgrade script in #{wd}"
sudo(sftp_user_uid,group_gid) do
cmd("/usr/local/bin/upgrade_wordpress #{shellescape(wd)}")
if options['scl']
cmd_prefix = "scl enable #{options['scl']} -- "
else
cmd_prefix = ''
end
cmd("#{cmd_prefix}/usr/local/bin/upgrade_wordpress #{shellescape(wd)}")
end
log "Upgrading Wordpress in #{wd} finished."
rescue => e
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment