sbcgua / sap-nw-abap-vagrant

Vagrant config for SAP NW developer edition
46 stars 15 forks source link

start/stopsap.sh scripts do not start #1

Closed sbcgua closed 6 years ago

sbcgua commented 6 years ago

from @gregorwolf

When I run: vagrant ssh sapnw -c stopsap.sh I get: bash: stopsap.sh: command not found

sbcgua commented 6 years ago

indeed a bug in a provision script, it copies files to /root not to /vagrant/root. Will fix tomorrow.

To fix in an existing installation try the following script under ssh
(or just separate commands - idea is to copy /vagrant/*.sap.sh to /home/vagrant/.local/bin and make them executable):

#!/bin/sh
_VAGRANT_HOME=/home/vagrant
_VAGRANT_HOME_BIN=$_VAGRANT_HOME/.local/bin

mkdir -p $_VAGRANT_HOME_BIN
chown vagrant:vagrant $_VAGRANT_HOME_BIN
chmod 700 $_VAGRANT_HOME_BIN

cp /vagrant/scripts/startsap.sh $_VAGRANT_HOME_BIN
cp /vagrant/scripts/stopsap.sh $_VAGRANT_HOME_BIN
chmod 700 $_VAGRANT_HOME_BIN/startsap.sh
chmod 700 $_VAGRANT_HOME_BIN/stopsap.sh
chown vagrant:vagrant $_VAGRANT_HOME_BIN/startsap.sh
chown vagrant:vagrant $_VAGRANT_HOME_BIN/stopsap.sh