sh '''
#!/bin/bash
#!/usr/bin/env python3
pwd
# ZAP Installation
sudo wget -q -O - https://github.com/zaproxy/zaproxy/releases/download/v2.11.0/ZAP_2.11.0_Linux.tar.gz | sudo tar zxf - -C /opt
sudo ln -s /opt/ZAP_2.11.0 /opt/zap
cd /opt/zap
ls -la
sudo wget -q -O /etc/init.d/zap https://raw.githubusercontent.com/stelligent/zap/master/packer/roles/zap/files/zap-init.sh
sudo chmod 755 /etc/init.d/zap
sudo /etc/init.d/zap start
# Fetch list of scripts before
loading bearer token and httpsender authentication script
curl 'http://localhost:8080/JSON/script/view/listScripts/?apikey=${zap_apikey}'
'''
I am getting error for command sudo /etc/init.d/zap start. The error says Starting Zap: /etc/init.d/zap: line 48: pushd: too many arguments
Till yesterday the same script was running fine and installation was succesful. I am attaching the screenshot for the same.
Please help me here. I am trying this but not able to figure out the error.
Thanks

sh '''
#!/bin/bash
#!/usr/bin/env python3
pwd
# ZAP Installation
sudo wget -q -O - https://github.com/zaproxy/zaproxy/releases/download/v2.11.0/ZAP_2.11.0_Linux.tar.gz | sudo tar zxf - -C /opt
sudo ln -s /opt/ZAP_2.11.0 /opt/zap
cd /opt/zap
ls -la
sudo wget -q -O /etc/init.d/zap https://raw.githubusercontent.com/stelligent/zap/master/packer/roles/zap/files/zap-init.sh
sudo chmod 755 /etc/init.d/zap
sudo /etc/init.d/zap start
# Fetch list of scripts before loading bearer token and httpsender authentication script
curl 'http://localhost:8080/JSON/script/view/listScripts/?apikey=${zap_apikey}'
curl http://0.0.0.0:8080
ls -la
'''
But the script is not working now and as you said it is not the official site from where I am using.