-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathupload
More file actions
53 lines (46 loc) · 811 Bytes
/
upload
File metadata and controls
53 lines (46 loc) · 811 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
TOUSER="tips"
TOHOST="192.168.1.55"
SSH="ssh -p 22"
TODIR="/opt/app/sg_upload"
case "$1" in
"")
;;
55)
;;
tips)
TOHOST="125.90.93.143"
;;
39out)
TOUSER="root"
TOHOST="39.108.116.183"
;;
xy)
TOUSER="root"
TOHOST="139.196.177.73"
SSH="ssh -p 1101"
;;
zz)
TOUSER="root"
TOHOST="101.200.197.156"
SSH="ssh -p 22000 -i qbtx.doc"
;;
zz_test)
TOUSER="root"
TOHOST="123.57.237.65"
SSH="ssh -p 22000 -i qbtx.doc"
TODIR="/data/sg_upload"
;;
*)
echo 'input one of them: 55, tips, xy'
exit
;;
esac
echo upload server to $1[$TOHOST]
if [ -d release/sql ]
then
mv release/sql release/sql_`date +'%Y_%m_%d'`
fi
TARGET_DIR=$TOUSER@$TOHOST:$TODIR
rsync -r -e "$SSH" --progress release/* $TARGET_DIR
rm -rf release