#!/bin/bash # copies the project directory from 100 server to 98 and 114 function deploy() { chown apache:apache /opt/app.sipay.com.tr/ -R; find /opt/app.sipay.com.tr/ -type d -exec chmod 755 {} \; # find /opt/app.sipay.com.tr/ -type f -exec chmod 644 {} \; chmod 777 /opt/app.sipay.com.tr/storage /opt/app.sipay.com.tr/vendor /opt/app.sipay.com.tr/sipayresource -R; while IFS= read -r dest; do ### mysql -uappadmin -pAdmin#902117 -h176.53.34.98 sipay_new < /opt/app.sipay.com.tr/sipay.sql rsync -avzhe ssh --owner --group --progress --exclude-from="exclude.txt" "/opt/app.sipay.com.tr/" "$dest:/opt/app.sipay.com.tr" rsync -avzhe ssh --owner --group --progress "/opt/app.sipay.com.tr/sipayresource/assets" "$dest:/opt/app.sipay.com.tr/sipayresource/assets" # echo "testing24" # done /opt/app.sipay.com.tr/sipay_sql.sql; #pssh --hosts hosts.txt --user root -i -A 'cd /opt/app.sipay.com.tr && php artisan view:clear && php artisan config:cache && php artisan cache:clear && php artisan route:clear && cd admin && php artisan view:clear && php artisan config:cache && php artisan cache:clear && php artisan route:clear' # /bin/pssh -A -i -H "176.53.34.104" -l bruce 'chown -R apache:apache /opt/app.sipay.com.tr/ && chmod -R 1777 /opt/app.sipay.com.tr/bootstrap/cache/ && chmod -R 1777 /opt/app.sipay.com.tr/storage/ && chmod -R 1777 /opt/app.sipay.com.tr/public/files && chmod -R 1777 /opt/app.sipay.com.tr/public/files/ && chmod -R 1777 /opt/app.sipay.com.tr/admin/bootstrap/cache/ && chmod -R 1777 /opt/app.sipay.com.tr/admin/storage/ && chmod -R 1777 /opt/app.sipay.com.tr/admin/public/files && chmod -R 1777 /opt/app.sipay.com.tr/admin/public/files/ && chmod -R 1777 /opt/app.sipay.com.tr/merchant/bootstrap/cache/ && chmod -R 1777 /opt/app.sipay.com.tr/merchant/storage/ && chmod -R 1777 /opt/app.sipay.com.tr/merchant/public/files && chmod -R 1777 /opt/app.sipay.com.tr/merchant/public/files/ && chmod -R 1777 /opt/app.sipay.com.tr/ccpayment/bootstrap/cache/ && chmod -R 1777 /opt/app.sipay.com.tr/ccpayment/storage/ && chmod -R 1777 /opt/app.sipay.com.tr/ccpayment/public/files && chmod -R 1777 /opt/app.sipay.com.tr/ccpayment/public/files/* && cd /opt/app.sipay.com.tr/ && php72 artisan config:cache && cd /opt/app.sipay.com.tr/ && php72 artisan view:clear && cd /opt/app.sipay.com.tr/ && php72 artisan route:clear && cd /opt/app.sipay.com.tr/ && php72 artisan cache:clear && cd /opt/app.sipay.com.tr/admin/ && php72 artisan config:cache && cd /opt/app.sipay.com.tr/admin/ && php72 artisan view:clear && cd /opt/app.sipay.com.tr/admin/ && php72 artisan route:clear && cd /opt/app.sipay.com.tr/admin/ && php72 artisan cache:clear && cd /opt/app.sipay.com.tr/merchant/ && php72 artisan config:cache && cd /opt/app.sipay.com.tr/merchant/ && php72 artisan view:clear && cd /opt/app.sipay.com.tr/merchant/ && php72 artisan route:clear && cd /opt/app.sipay.com.tr/merchant/ && php72 artisan cache:clear && cd /opt/app.sipay.com.tr/ccpayment/ && php72 artisan config:cache && cd /opt/app.sipay.com.tr/ccpayment/ && php72 artisan view:clear && cd /opt/app.sipay.com.tr/ccpayment/ && php72 artisan route:clear && cd /opt/app.sipay.com.tr/ccpayment/ && php72 artisan cache:clear' /bin/pssh -A -i -H "176.53.6.134" -l bruce 'chown -R apache:apache /opt/app.sipay.com.tr/ && chmod -R 1777 /opt/app.sipay.com.tr/bootstrap/cache/ && chmod -R 1777 /opt/app.sipay.com.tr/storage/ && chmod -R 1777 /opt/app.sipay.com.tr/public/files && chmod -R 1777 /opt/app.sipay.com.tr/public/files/ && chmod -R 1777 /opt/app.sipay.com.tr/admin/bootstrap/cache/ && chmod -R 1777 /opt/app.sipay.com.tr/admin/storage/ && chmod -R 1777 /opt/app.sipay.com.tr/admin/public/files && chmod -R 1777 /opt/app.sipay.com.tr/admin/public/files/ && chmod -R 1777 /opt/app.sipay.com.tr/merchant/bootstrap/cache/ && chmod -R 1777 /opt/app.sipay.com.tr/merchant/storage/ && chmod -R 1777 /opt/app.sipay.com.tr/merchant/public/files && chmod -R 1777 /opt/app.sipay.com.tr/merchant/public/files/ && chmod -R 1777 /opt/app.sipay.com.tr/ccpayment/bootstrap/cache/ && chmod -R 1777 /opt/app.sipay.com.tr/ccpayment/storage/ && chmod -R 1777 /opt/app.sipay.com.tr/ccpayment/public/files && chmod -R 1777 /opt/app.sipay.com.tr/ccpayment/public/files/* && cd /opt/app.sipay.com.tr/ && php72 artisan config:cache && cd /opt/app.sipay.com.tr/ && php72 artisan view:clear && cd /opt/app.sipay.com.tr/ && php72 artisan route:clear && cd /opt/app.sipay.com.tr/ && php72 artisan cache:clear && cd /opt/app.sipay.com.tr/admin/ && php72 artisan config:cache && cd /opt/app.sipay.com.tr/admin/ && php72 artisan view:clear && cd /opt/app.sipay.com.tr/admin/ && php72 artisan route:clear && cd /opt/app.sipay.com.tr/admin/ && php72 artisan cache:clear && cd /opt/app.sipay.com.tr/merchant/ && php72 artisan config:cache && cd /opt/app.sipay.com.tr/merchant/ && php72 artisan view:clear && cd /opt/app.sipay.com.tr/merchant/ && php72 artisan route:clear && cd /opt/app.sipay.com.tr/merchant/ && php72 artisan cache:clear && cd /opt/app.sipay.com.tr/ccpayment/ && php72 artisan config:cache && cd /opt/app.sipay.com.tr/ccpayment/ && php72 artisan view:clear && cd /opt/app.sipay.com.tr/ccpayment/ && php72 artisan route:clear && cd /opt/app.sipay.com.tr/ccpayment/ && php72 artisan cache:clear' chown apache:apache /opt/app.sipay.com.tr/ -R; chmod 777 /opt/app.sipay.com.tr/ -R; }