1. 變量58Please respect copyright.PENANAShtQSLInwX
app=buda58Please respect copyright.PENANAgibDr6cSlv
docs_dir=/home/buda/code/$app58Please respect copyright.PENANAOvU3ym950m
cd $docs_dir
2. 時間58Please respect copyright.PENANAUIojGcib0t
deploy_time=$(date "+%Y-%m-%d.%H_%M_%S")
3. 命令行參數58Please respect copyright.PENANARVX8brGdnX
$1 $2 ...
4. 註釋58Please respect copyright.PENANA5YE3RsQEep
# prepare files
5. 在遠程server上運行命令58Please respect copyright.PENANAEmQka2uXYd
ssh root@server.ip << EOF58Please respect copyright.PENANAAzO03gL5If
systemctl stop $app58Please respect copyright.PENANAl5MCnOYyku
EOF
58Please respect copyright.PENANAmQUAKmxSAw
如果您對C語言編程、網站開發、Vue, Git, Linux, Shell感興趣,邀請您加入淨明創建的「Linux + C語言 + Vue + Git 網站開發技術學習交流微信羣」,請加淨明的微信(si_jinmin)以便拉您進羣。