• 作業系統
    • Windows
    • Linux
  • 資料庫
    • SQL Server
    • MySQL/MariaDB
  • 腳本
    • PowerShell
    • Shell Script
  • 開源服務
  • 虛擬化
  • 容器
  • 雲服務
  • 網路
  • 其他
  • WordPress
  • Javascript
  • PHP
  • Search
挨踢攻城獅學習之路
不太詳細紀錄
Skip to content
  • 作業系統
    • Windows
    • Linux
  • 資料庫
    • SQL Server
    • MySQL/MariaDB
  • 腳本
    • PowerShell
    • Shell Script
  • 開源服務
  • 虛擬化
  • 容器
  • 雲服務
  • 網路
  • 其他
  • WordPress
  • Javascript
  • PHP
  • Search
分類: 腳本

分類: 腳本

Home Archive for category "腳本"

ShellScript:發送 IP 到 FortiGate、Cloudflare 進行封鎖

寫了個 Script,用來把監控送來的 IP 清單,丟到 FortiGate 及 Cloudflare 黑名單,大致是 監控系統會統計 nginx 連線 IP 及連線數量,當 IP 連線數量超過闕值,就透過 webhook 去 Trigger Gitlab CI 運行 Script。 Script …

 fortigate
Read more "ShellScript:發送 IP 到 FortiGate、Cloudflare 進行封鎖"

ShellScript:Cloudflare API v4 動態更新 IP 實現 DDNS 功能

Cloudflare API v4 動態更新 DNS IP 實現 DDNS 功能,主要補充了 Record ID 直接透過指令過濾出來,連貫運行接下來的 IP 修改

 shellscript
Read more "ShellScript:Cloudflare API v4 動態更新 IP 實現 DDNS 功能"

Batch: 批次新增用戶及設定群組

Windows 批次增加多用戶並設定預設密碼、群組user.txt add.bat,以下 for 本機用戶 參考來源:如何使用命令列工具 net / WMIC 快速建立 Windows 系統帳戶、微軟

 batch
Read more "Batch: 批次新增用戶及設定群組"

Linux:ssh + schtasks 在 Windows 建立排程執行特定工作

在 Linux 下使用命令對 Windows 進行操作,可在 Windows 裝 OpenSSH 伺服器,再從 Linux 用 ssh / sshpass 來下命令,但有些軟體在 Windows 雖有提供命令,卻無法直接由 Linux 來下達,狀況是運行後命令會卡住,在 Windows 下執行就正常 …

 shellscript / ssh
Read more "Linux:ssh + schtasks 在 Windows 建立排程執行特定工作"

ShellScript:bash 與 sh 不一樣的坑 [[: not found

寫了一段 Shell 在不同功能的 Container 下執行時,碰到以下錯誤 爬文發現 [[ ]] 在 sh 下運行會有問題,但該 container 沒有 bash,故需改寫為 來源:String comparison in bash. [[: not found

 shellscript
Read more "ShellScript:bash 與 sh 不一樣的坑 [[: not found"

Kubernetes:kubectl命令自動補全

爬文爬到的很方便,直接執行就好了 我是放在安裝docker、kubernetes 的shellscript裡,一起跑完。 出處:Kubernetes kubectl 命令自动补全 | abcdocker运维博客

 kubernetes / shellscript
Read more "Kubernetes:kubectl命令自動補全"

Docker:DIY WordPress Image並在Container啟動時運行Nginx

這是練習用的,所以沒有使用Docker Hub上的WordPress鏡像
base image 是使用CentOS 8,所以整個image很肥大XD

 docker / shellscript
Read more "Docker:DIY WordPress Image並在Container啟動時運行Nginx"

Batch:檢查服務狀態,並自動啟動

上月幫公司關鍵服務 SQL Server Database 建 Mirror(參考SQL Server Mirror筆記)但昨天維護主機時卻發現,啊看!怎麼SQL沒運行,即使有更新重開機,服務的啟動類型是自動也該跑啊!為解決這問題,開始思考應該:時時檢查服務狀態,當服務未啟動時,下指令讓他啟動爬文了 …

 batch / troubleshooting
Read more "Batch:檢查服務狀態,並自動啟動"

Powershell:排程還原SQL最近一份完整備份

陸廠某DB,需每天還原台廠的DB Full Backup,但不需要即時、也不想佔用MPLS頻寬故沒採用log shipping等機制,直接用OneDrive +Powershell來抓同步到陸廠的備份檔,排程每天半夜進行還原沒記錯話,以下是參考:《PowerShell V3——SQL Server …

 powershell / sql
Read more "Powershell:排程還原SQL最近一份完整備份"

SQL Server:建立認證名稱以執行PowerShell

我在設定SQL Server Agent 備份作業時,有使用到PowerShell來複製備份檔到File Server上,但「SQL Server Agent 服務帳戶」執行PowerShell時,可能因權限關係,無法將檔案複製到File Server,故自己新建一個 1、Microsoft SQL …

 powershell / sql
Read more "SQL Server:建立認證名稱以執行PowerShell"

文章導覽

1 2

近期文章

  • ShellScript:發送 IP 到 FortiGate、Cloudflare 進行封鎖
  • Google Apps Script: Form 無法發 Telegram、Line Bot Notify
  • Google Sheet: 操作問題筆記
  • Google Apps Script: Web App 手機 RWD 問題
  • Gitlab: 跨版本升級順序

分類

  • WordPress (29)
  • 作業系統 (45)
    • Linux (31)
    • Windows (15)
  • 全端 (29)
    • CSS (3)
    • Dev Env (4)
    • Go (1)
    • Javascript (15)
    • PHP (6)
  • 其他 (11)
  • 容器 (10)
    • Docker (7)
    • Kubernetes (2)
  • 網路 (7)
  • 腳本 (14)
    • Batch (3)
    • PowerShell (4)
    • Shell Script (8)
  • 虛擬化 (8)
  • 資料庫 (9)
    • MySQL/MariaDB (1)
    • SQL Server (8)
  • 開源服務 (19)
  • 雲服務 (6)

標籤

analysis apache backup batch btrfs centos cisco cmder command css docker duplicati esxi firewall fortigate git Go google sheet hyper-v javascript kubernetes librenms linux mariadb network nextcloud nginx php plugins powershell redmine samba security selinux shellscript sql ssh troubleshooting vembu Visual Studio vps vue.js wordpress wsl zfs
Back to Top
©2019-2023 挨踢攻城獅學習紀錄
Powered by Anima & WordPress.