push.sh - reset permissions after module load

This commit is contained in:
Bill Church 2019-05-25 12:51:03 -04:00
parent f0b9653d88
commit bd56ee299e
6 changed files with 18 additions and 18 deletions

View file

@ -1 +1 @@
67e73a170ca3c03ddf5d8a4ed5e106bdd4bda61d8c78c36c1c5ec56feb5f81b2 Build/Release/BIG-IP-ILX-WebSSH2-0.2.8.tgz fbb7bc5eb954b47a29361127045102c4421760e1456bab17c43793ec0434f2b6 Build/Release/BIG-IP-ILX-WebSSH2-0.2.8.tgz

Binary file not shown.

View file

@ -1 +1 @@
67e73a170ca3c03ddf5d8a4ed5e106bdd4bda61d8c78c36c1c5ec56feb5f81b2 Build/Release/BIG-IP-ILX-WebSSH2-0.2.8.tgz fbb7bc5eb954b47a29361127045102c4421760e1456bab17c43793ec0434f2b6 Build/Release/BIG-IP-ILX-WebSSH2-0.2.8.tgz

View file

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
webssh_ilxhost=root@192.168.30.209 #webssh_ilxhost=root@192.168.30.209
#webssh_ilxhost=root@192.168.30.203 webssh_ilxhost=root@192.168.30.203
webssh_workspace_name=webssh2 webssh_workspace_name=webssh2
webssh_package_name=BIG-IP-ILX-WebSSH2 webssh_package_name=BIG-IP-ILX-WebSSH2
webssh_pua_location=./bin webssh_pua_location=./bin

View file

@ -40,20 +40,6 @@ echo -e "\n"
echo "Pushing ./workspace to $webssh_ilxhost at $webssh_workspace_name" echo "Pushing ./workspace to $webssh_ilxhost at $webssh_workspace_name"
rsync -e 'ssh -o ClearAllForwardings=yes -ax' -avq --delete --exclude='.DS_Store' --exclude extensions/webssh2/node_modules workspace/. $webssh_ilxhost:/var/ilx/workspaces/Common/$webssh_workspace_name/. rsync -e 'ssh -o ClearAllForwardings=yes -ax' -avq --delete --exclude='.DS_Store' --exclude extensions/webssh2/node_modules workspace/. $webssh_ilxhost:/var/ilx/workspaces/Common/$webssh_workspace_name/.
echo -e "\n"
echo "Setting permissions at $webssh_workspace_name on $webssh_ilxhost"
output=$(ssh -o ClearAllForwardings=yes $webssh_ilxhost "chown -R root.sdm /var/ilx/workspaces/Common/$webssh_workspace_name/; \
chmod -R ug+rwX,o-w /var/ilx/workspaces/Common/$webssh_workspace_name/; \
chmod u+rw,go-w /var/ilx/workspaces/Common/$webssh_workspace_name/version; \
chmod u+rw,go-w /var/ilx/workspaces/Common/$webssh_workspace_name/node_version" 2>&1)
result="$?" 2>&1
if [ $result -ne 0 ]; then
echo -e "\n\n"
echo "Error setting permissions... I give up, not sure what's going on..."
echo -e "\n\n"
exit 255
fi
echo -e "\n" echo -e "\n"
echo "Installing node modules at $webssh_workspace_name on $webssh_ilxhost" echo "Installing node modules at $webssh_workspace_name on $webssh_ilxhost"
output=$(ssh -o ClearAllForwardings=yes $webssh_ilxhost "cd /var/ilx/workspaces/Common/$webssh_workspace_name/extensions/webssh2; npm i --production" 2>&1) output=$(ssh -o ClearAllForwardings=yes $webssh_ilxhost "cd /var/ilx/workspaces/Common/$webssh_workspace_name/extensions/webssh2; npm i --production" 2>&1)
@ -70,6 +56,20 @@ if [ $result -ne 0 ]; then
exit 255 exit 255
fi fi
echo -e "\n"
echo "Setting permissions at $webssh_workspace_name on $webssh_ilxhost"
output=$(ssh -o ClearAllForwardings=yes $webssh_ilxhost "chown -R root.sdm /var/ilx/workspaces/Common/$webssh_workspace_name/; \
chmod -R ug+rwX,o-w /var/ilx/workspaces/Common/$webssh_workspace_name/; \
chmod u+rw,go-w /var/ilx/workspaces/Common/$webssh_workspace_name/version; \
chmod u+rw,go-w /var/ilx/workspaces/Common/$webssh_workspace_name/node_version" 2>&1)
result="$?" 2>&1
if [ $result -ne 0 ]; then
echo -e "\n\n"
echo "Error setting permissions... I give up, not sure what's going on..."
echo -e "\n\n"
exit 255
fi
echo -e "\n" echo -e "\n"
echo "Deleting $webssh_workspace_name/node_modules/.bin on $webssh_ilxhost" echo "Deleting $webssh_workspace_name/node_modules/.bin on $webssh_ilxhost"
output=$(ssh -o ClearAllForwardings=yes $webssh_ilxhost "cd /var/ilx/workspaces/Common/$webssh_workspace_name/extensions/webssh2; rm -rf node_modules/.bin" 2>&1) output=$(ssh -o ClearAllForwardings=yes $webssh_ilxhost "cd /var/ilx/workspaces/Common/$webssh_workspace_name/extensions/webssh2; rm -rf node_modules/.bin" 2>&1)