You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.1 KiB
Bash

#/bin/bash
echo "================= rsync files =================";
rsync -av --delete --exclude=vendor --exclude=runtime /data/project/service/ /home/project/service;
echo ""
while getopts "io" opt; do
case $opt in
i)
echo "================= composer install =================";
echo "dist:"
cd /home/project/service;
composer install;
echo ""
echo "source:"
cd /data/project/service;
composer install;
echo ""
;;
o)
echo "================= composer dump-autoload -o =================";
echo "dist:"
cd /home/project/service;
composer dump-autoload -o;
echo ""
echo "source:"
cd /data/project/service;
composer dump-autoload -o;
echo ""
;;
\?)
echo "Invalid option: -$OPTARG"
echo ""
;;
esac
done
echo "================= start service =================";
cd /home/project/service;
php bin/hyperf.php start;