Initial commit

This commit is contained in:
2026-04-19 21:43:13 +07:00
commit b66b6589c8
6 changed files with 1206 additions and 0 deletions
Executable
+27
View File
@@ -0,0 +1,27 @@
#!/bin/bash
# up-s.sh - Upload file lên server oc
if [ $# -ne 1 ]; then
echo "Usage: $0 <local-file>"
exit 1
fi
LOCAL_FILE=$1
REMOTE_HOST="oc"
REMOTE_PATH="/app/thuanle.me/s.thuanle.me/data/"
if [ ! -f "$LOCAL_FILE" ]; then
echo "Error: File '$LOCAL_FILE' không tồn tại."
exit 2
fi
echo "Đang upload $LOCAL_FILE lên $REMOTE_HOST:$REMOTE_PATH ..."
scp "$LOCAL_FILE" "${REMOTE_HOST}:${REMOTE_PATH}"
if [ $? -eq 0 ]; then
echo "Upload thành công."
else
echo "Upload thất bại."
exit 3
fi