Skip to content

Commit ea0ee4f

Browse files
committed
chore: initial commit with clean history
0 parents  commit ea0ee4f

48 files changed

Lines changed: 9285 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: Sync READMEs to Website
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- '**/README-*.md'
9+
10+
jobs:
11+
sync:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout msp-scripts repo
15+
uses: actions/checkout@v4
16+
with:
17+
path: msp-scripts
18+
19+
- name: Checkout website repo
20+
uses: actions/checkout@v4
21+
with:
22+
repository: Glyph-SH/website
23+
token: ${{ secrets.WEBSITE_SYNC_TOKEN }}
24+
path: website
25+
26+
- name: Run sync script
27+
run: |
28+
cd website
29+
export SCRIPTS_REPO="${GITHUB_WORKSPACE}/msp-scripts"
30+
export HUGO_CONTENT="${GITHUB_WORKSPACE}/website/content/scripts"
31+
32+
# Remove old generated script pages (keep _index.md and view.md)
33+
find "$HUGO_CONTENT" -name "*.md" ! -name "_index.md" ! -name "view.md" -type f -delete
34+
35+
# Copy all README files to Hugo content directory
36+
echo "Syncing README files to Hugo..."
37+
find "$SCRIPTS_REPO" -name "README-*.md" | while read readme; do
38+
# Get relative path from repo root
39+
rel_path=${readme#$SCRIPTS_REPO/}
40+
41+
# Determine target directory in Hugo content
42+
dir_path=$(dirname "$rel_path")
43+
filename=$(basename "$readme")
44+
45+
# Create target directory
46+
target_dir="$HUGO_CONTENT/$dir_path"
47+
mkdir -p "$target_dir"
48+
49+
# Extract script name from README filename
50+
script_name=$(echo "$filename" | sed 's/README-//' | sed 's/\.md$//')
51+
52+
# Parse README to extract title and description
53+
title=$(head -1 "$readme" | sed 's/^# //')
54+
# Description is on line 3 (the bold text after title)
55+
description=$(sed -n '3p' "$readme" | sed 's/^\*\*//' | sed 's/\*\*$//' | sed 's/\\/\\\\/g' | sed 's/"/\\"/g')
56+
57+
# Determine OS and category from path
58+
os=$(echo "$dir_path" | cut -d'/' -f1)
59+
category=$(echo "$dir_path" | cut -d'/' -f2)
60+
61+
# Capitalize for display
62+
os_display=$(echo "$os" | awk '{print toupper(substr($0,1,1)) tolower(substr($0,2))}')
63+
category_display=$(echo "$category" | sed 's/-/ /g' | awk '{for(i=1;i<=NF;i++)sub(/./,toupper(substr($i,1,1)),$i)}1')
64+
65+
# Create Hugo markdown file with frontmatter
66+
target_file="$target_dir/${script_name}.md"
67+
68+
cat > "$target_file" <<EOF
69+
---
70+
title: "$title"
71+
description: "$description"
72+
date: $(date +%Y-%m-%d)
73+
categories: ["$os_display", "$category_display"]
74+
tags: ["$os_display", "$category_display", "Automation"]
75+
---
76+
77+
EOF
78+
79+
# Append README content (skip everything up to and including the badge sections)
80+
# Find the first ## heading (like "## Overview") and start from there
81+
awk '/^## / {found=1} found {print}' "$readme" >> "$target_file"
82+
83+
echo "Created: $target_file"
84+
done
85+
86+
echo "Script documentation synced successfully!"
87+
echo "Total pages: $(find "$HUGO_CONTENT" -name "*.md" ! -name "_index.md" ! -name "view.md" | wc -l)"
88+
89+
- name: Commit and push changes
90+
run: |
91+
cd website
92+
git config user.name "GitHub Actions Bot"
93+
git config user.email "actions@github.com"
94+
git add content/scripts/
95+
if git diff --staged --quiet; then
96+
echo "No changes to commit"
97+
else
98+
git commit -m "Auto-sync script documentation from msp-scripts"
99+
git push
100+
fi

.gitignore

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# OS files
2+
.DS_Store
3+
Thumbs.db
4+
5+
# Editor files
6+
*.swp
7+
*.swo
8+
*~
9+
.vscode/
10+
.idea/
11+
12+
# Test files
13+
test/
14+
*.test.ps1
15+
16+
# Logs
17+
*.log
18+
19+
# Temporary files
20+
*.tmp
21+
*.bak
22+
23+
# CLI tooling and root utility files
24+
cli.py
25+
toolbox/
26+
data/
27+
28+
# Root directory utility files (use subdirectories for actual scripts)
29+
/*.sh
30+
/*.py
31+
/*.md
32+
!README.md

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 glyph.sh
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
# MSP Scripts Collection
2+
3+
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/Glyph-SH/msp-scripts/blob/main/LICENSE)
4+
[![Scripts](https://img.shields.io/badge/Scripts-22-green.svg)](https://github.com/Glyph-SH/msp-scripts)
5+
[![Platform](https://img.shields.io/badge/Platform-Windows%20%7C%20Linux%20%7C%20macOS-orange.svg)](https://github.com/Glyph-SH/msp-scripts)
6+
[![Documentation](https://img.shields.io/badge/Docs-glyph.sh-blue.svg)](https://glyph.sh/scripts/)
7+
8+
Production-ready PowerShell, Bash, and Python scripts for MSPs and system administrators.
9+
10+
---
11+
12+
## Structure
13+
14+
```
15+
├── windows/ # Windows-specific scripts (PowerShell)
16+
├── linux/ # Linux-specific scripts (Bash/Python)
17+
├── macos/ # MacOS-specific scripts (Bash)
18+
└── cross-platform/ # Cross-platform scripts (Python)
19+
├── emergency/ # Critical incident response
20+
├── security/ # Security auditing and hardening
21+
├── health/ # System health checks
22+
├── quick-fixes/ # Common problem resolution
23+
├── active-directory/ # AD management
24+
├── backup/ # Backup and recovery
25+
└── network/ # Network diagnostics
26+
```
27+
28+
## Quick Start
29+
30+
### Download Individual Script
31+
32+
**Windows (PowerShell):**
33+
```powershell
34+
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/yourusername/msp-scripts/main/windows/quick-fixes/Reset-WindowsUpdate.ps1" -OutFile "Reset-WindowsUpdate.ps1"
35+
```
36+
37+
**Linux (curl):**
38+
```bash
39+
curl -O https://raw.githubusercontent.com/yourusername/msp-scripts/main/linux/security/audit-security.sh
40+
chmod +x audit-security.sh
41+
```
42+
43+
**Linux (wget):**
44+
```bash
45+
wget https://raw.githubusercontent.com/yourusername/msp-scripts/main/linux/security/audit-security.sh
46+
chmod +x audit-security.sh
47+
```
48+
49+
**MacOS (curl):**
50+
```bash
51+
curl -O https://raw.githubusercontent.com/yourusername/msp-scripts/main/macos/security/macos-security-audit.sh
52+
chmod +x macos-security-audit.sh
53+
```
54+
55+
### Clone Entire Repository
56+
57+
```bash
58+
git clone https://github.com/yourusername/msp-scripts.git
59+
cd msp-scripts
60+
```
61+
62+
---
63+
64+
## RMM Integration
65+
66+
These scripts are designed to work with popular RMM platforms:
67+
68+
- **NinjaRMM**: Import as script library components
69+
- **Datto RMM**: Upload to script repository
70+
- **ConnectWise Automate**: Add to script center
71+
- **Syncro**: Import as custom scripts
72+
- **Action1**: Upload to script library
73+
- **Atera**: Add to custom scripts section
74+
75+
See individual script documentation for RMM-specific integration instructions.
76+
77+
---
78+
79+
## Usage
80+
81+
Each script includes:
82+
- Detailed synopsis and description
83+
- Parameter documentation
84+
- Usage examples
85+
- Requirements and prerequisites
86+
- Expected execution time
87+
88+
Refer to the [documentation site](https://glyph.sh/scripts/) for detailed guides.
89+
90+
---
91+
92+
## Categories
93+
94+
### Emergency Response
95+
Scripts for critical incidents requiring immediate action (account lockouts, service failures, etc.)
96+
97+
### Security & Auditing
98+
Security hardening, vulnerability scanning, and compliance checking
99+
100+
### System Health
101+
Diagnostic tools and health monitoring scripts
102+
103+
### Quick Fixes
104+
Common problem resolution (Windows Update, DNS cache, etc.)
105+
106+
### Active Directory
107+
AD management, user administration, and group policy tools
108+
109+
### Backup & Recovery
110+
Backup verification, restore testing, and data recovery
111+
112+
### Network Tools
113+
Network diagnostics, connectivity testing, and troubleshooting
114+
115+
---
116+
117+
## License
118+
119+
MIT License - See LICENSE file for details
120+
121+
## Contributing
122+
123+
Contributions welcome! Please open an issue or submit a pull request.
124+
125+
## Support
126+
127+
For issues, questions, or suggestions:
128+
- Visit [glyph.sh](https://glyph.sh)
129+
- Open a GitHub issue
130+
- See individual script documentation
131+
132+
---
133+
134+
**Disclaimer**: Test scripts in a non-production environment before deployment. Always follow your organization's change management procedures.
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# backup-report-generator.sh
2+
3+
**Generate backup status reports**
4+
5+
### Status & Maintenance
6+
7+
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/Glyph-SH/msp-scripts/blob/main/LICENSE)
8+
[![Maintained](https://img.shields.io/badge/Maintained-Yes-green.svg)]()
9+
10+
### Platform & Requirements
11+
12+
[![Platform: Linux](https://img.shields.io/badge/Platform-Linux-blue.svg)]()
13+
[![Root Required](https://img.shields.io/badge/Root-Not%20Required-green.svg)]()
14+
[![Dependencies](https://img.shields.io/badge/Dependencies-Standard%20Utils-green.svg)]()
15+
16+
### Features & Capabilities
17+
18+
[![Type](https://img.shields.io/badge/Type-Backup%20&%20Recovery-blue.svg)]()
19+
[![Category](https://img.shields.io/badge/Category-Backup-purple.svg)]()
20+
21+
## ![Overview](https://raw.githubusercontent.com/Glyph-SH/website/main/static/img/readme-icons/overview.svg) Overview
22+
23+
`backup-report-generator.sh` - Generate backup status reports
24+
25+
### Key Features
26+
27+
- Automated execution with minimal user intervention
28+
- Comprehensive error handling and logging
29+
- Production-ready for MSP environments
30+
- Follows security best practices
31+
32+
## ![Quick Start](https://raw.githubusercontent.com/Glyph-SH/website/main/static/img/readme-icons/quickstart.svg) Quick Start
33+
34+
```bash
35+
# Download the script
36+
curl -O https://raw.githubusercontent.com/Glyph-SH/msp-scripts/main/linux/backup/backup-report-generator.sh
37+
chmod +x backup-report-generator.sh
38+
39+
# Run the script
40+
./backup-report-generator.sh
41+
```
42+
43+
## ![Usage](https://raw.githubusercontent.com/Glyph-SH/website/main/static/img/readme-icons/usage.svg) Usage
44+
45+
```bash
46+
backup-report-generator.sh [OPTIONS]
47+
```
48+
49+
Run with `--help` or `-h` to see all available options.
50+
51+
## ![Examples](https://raw.githubusercontent.com/Glyph-SH/website/main/static/img/readme-icons/examples.svg?v=2) Examples
52+
53+
```bash
54+
# Basic usage
55+
./backup-report-generator.sh
56+
57+
# View help
58+
./backup-report-generator.sh --help
59+
```
60+
61+
## ![Requirements](https://raw.githubusercontent.com/Glyph-SH/website/main/static/img/readme-icons/requirements.svg) Requirements
62+
63+
- **OS**: Linux
64+
- **Privileges**: Not Required
65+
- **Dependencies**: Standard system utilities
66+
67+
## ![Links](https://raw.githubusercontent.com/Glyph-SH/website/main/static/img/readme-icons/links.svg) Links
68+
69+
| Resource | URL |
70+
|----------|-----|
71+
| **View on GitHub** | [`backup-report-generator.sh`](https://github.com/Glyph-SH/msp-scripts/blob/main/linux/backup/backup-report-generator.sh) |
72+
| **Download Raw** | [`backup-report-generator.sh`](https://raw.githubusercontent.com/Glyph-SH/msp-scripts/main/linux/backup/backup-report-generator.sh) |
73+
| **Report Issues** | [GitHub Issues](https://github.com/Glyph-SH/msp-scripts/issues) |
74+
75+
## ![License](https://raw.githubusercontent.com/Glyph-SH/website/main/static/img/readme-icons/license.svg) License
76+
77+
MIT License - Copyright (c) 2025 glyph.sh
78+
79+
See [LICENSE](https://github.com/Glyph-SH/msp-scripts/blob/main/LICENSE) for full license text.
80+
81+
**For authorized use only.**

0 commit comments

Comments
 (0)