forked from nemke82/magento2gitpod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
blackfire-run.sh
21 lines (14 loc) · 1.1 KB
/
blackfire-run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
blackfire-agent --register
blackfire config
cat /etc/blackfire/agent | grep "client-id=" | sed 's/server-id/blackfire.client_id/' >> /etc/php/7.2/cli/conf.d/92-blackfire-config.ini
cat /etc/blackfire/agent | grep "client-token=" | sed 's/server-token/blackfire.client_token/' >> /etc/php/7.2/cli/conf.d/92-blackfire-config.ini
cat /etc/blackfire/agent | grep "server-id=" | sed 's/server-id/blackfire.server_id/' >> /etc/php/7.2/fpm/conf.d/92-blackfire-config.ini
cat /etc/blackfire/agent | grep "server-token=" | sed 's/server-token/blackfire.server_token/' >> /etc/php/7.2/fpm/conf.d/92-blackfire-config.ini
sed -i '/blackfire.agent_socket/d' /etc/php/7.2/fpm/conf.d/92-blackfire-config.ini
sed -i '/blackfire.agent_socket/d' /etc/php/7.2/cli/conf.d/92-blackfire-config.ini
echo "blackfire.agent_socket=unix:///tmp/agent.sock" >> /etc/php/7.2/fpm/conf.d/92-blackfire-config.ini
echo "blackfire.agent_socket=unix:///tmp/agent.sock" >> /etc/php/7.2/cli/conf.d/92-blackfire-config.ini
#restart php7.2-fpm
service php7.2-fpm stop && service php7.2-fpm restart
blackfire-agent --socket=unix:///tmp/agent.sock &