Files
RTG/auto_script/shell_code/.custom_commands.sh
2026-06-19 20:08:01 +06:00

30 lines
5.3 KiB
Bash

#!/bin/bash
# copies the project directory from 100 server to 98 and 114
function deploy() {
#chown root:root /var/www/html/ -R;
#find /var/www/html/ -type d -exec chmod 777 {} \;
# chmod 777 /opt/app.sipay.com.tr/storage /opt/app.sipay.com.tr/vendor /opt/app.sipay.com.tr/sipayresource -R;
rsync -avzhe ssh --owner --group --progress --recursive --files-from="include.txt" --exclude-from="exclude.txt" "/var/www/html/" "apache@45.55.43.211:/var/www/html/"
# rsync -avzhe ssh --owner --group --progress "/opt/app.sipay.com.tr/sipayresource/assets" "bruce@176.53.6.134:/opt/app.sipay.com.tr/sipayresource/assets"
#/bin/pssh -A -i -H "176.53.6.134" -l apache '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'
#chmod 755 /var/www/html/ -R;
}
#function deploy104() {
# chown apache:apache /opt/app.sipay.com.tr/ -R;
# find /opt/app.sipay.com.tr/ -type d -exec chmod 755 {} \;
# chmod 777 /opt/app.sipay.com.tr/storage /opt/app.sipay.com.tr/vendor /opt/app.sipay.com.tr/sipayresource -R;
# rsync -avzhe ssh --owner --group --progress --exclude-from="exclude.txt" "/opt/app.sipay.com.tr/" "bruce@176.53.34.104:/opt/app.sipay.com.tr"
# rsync -avzhe ssh --owner --group --progress "/opt/app.sipay.com.tr/sipayresource/assets" "bruce@176.53.34.104:/opt/app.sipay.com.tr/sipayresource/assets"
#
# /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'
# chown apache:apache /opt/app.sipay.com.tr/ -R;
# chmod 777 /opt/app.sipay.com.tr/ -R;
#
#}