mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Use systemctl only if systemd is present else use the service wrapper
This commit is contained in:
parent
5137c78ee5
commit
1cecc2cc99
@ -13,8 +13,15 @@ add_blackfire_darwin() {
|
|||||||
blackfire_config() {
|
blackfire_config() {
|
||||||
if [[ -n $BLACKFIRE_SERVER_ID ]] && [[ -n $BLACKFIRE_SERVER_TOKEN ]]; then
|
if [[ -n $BLACKFIRE_SERVER_ID ]] && [[ -n $BLACKFIRE_SERVER_TOKEN ]]; then
|
||||||
blackfire agent:config --server-id="$BLACKFIRE_SERVER_ID" --server-token="$BLACKFIRE_SERVER_TOKEN"
|
blackfire agent:config --server-id="$BLACKFIRE_SERVER_ID" --server-token="$BLACKFIRE_SERVER_TOKEN"
|
||||||
[ "$os" = "Linux" ] && sudo systemctl start blackfire-agent
|
if [ "$os" = "Linux" ]; then
|
||||||
[ "$os" = "Darwin" ] && brew services start blackfire
|
if [ -d /run/systemd/system ]; then
|
||||||
|
sudo systemctl start blackfire-agent
|
||||||
|
else
|
||||||
|
sudo service blackfire-agent start
|
||||||
|
fi
|
||||||
|
elif [ "$os" = "Darwin" ]; then
|
||||||
|
brew services start blackfire
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ -n $BLACKFIRE_CLIENT_ID ]] && [[ -n $BLACKFIRE_CLIENT_TOKEN ]]; then
|
if [[ -n $BLACKFIRE_CLIENT_ID ]] && [[ -n $BLACKFIRE_CLIENT_TOKEN ]]; then
|
||||||
blackfire client:config --client-id="$BLACKFIRE_CLIENT_ID" --client-token="$BLACKFIRE_CLIENT_TOKEN"
|
blackfire client:config --client-id="$BLACKFIRE_CLIENT_ID" --client-token="$BLACKFIRE_CLIENT_TOKEN"
|
||||||
|
Loading…
Reference in New Issue
Block a user