53 lines
1.1 KiB
Bash
Executable File
53 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Scanopy Setup Script
|
|
# This script automates the setup of Scanopy for homelab network documentation
|
|
|
|
echo "Setting up Scanopy for homelab network documentation..."
|
|
|
|
# Create required directories
|
|
mkdir -p /opt/scanopy/config
|
|
mkdir -p /opt/scanopy/data
|
|
|
|
# Create basic Scanopy configuration
|
|
cat > /opt/scanopy/config/scanopy.yml << 'EOF'
|
|
# Scanopy Configuration
|
|
name: "MyHomelab"
|
|
description: "Homelab network documentation"
|
|
scan:
|
|
interval: 3600
|
|
targets:
|
|
- 192.168.1.0/24
|
|
protocols:
|
|
- snmp
|
|
- ssh
|
|
- http
|
|
- https
|
|
# Add additional configuration as needed
|
|
export:
|
|
formats:
|
|
- mermaid
|
|
- svg
|
|
- confluence
|
|
output_dir: /opt/scanopy/data
|
|
EOF
|
|
|
|
# Create systemd service file for Scanopy
|
|
cat > /etc/systemd/system/scanopy.service << 'EOF'
|
|
[Unit]
|
|
Description=Scanopy Network Documentation
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=scanopy
|
|
Group=scanopy
|
|
ExecStart=/usr/local/bin/scanopy --config /opt/scanopy/config/scanopy.yml
|
|
Restart=always
|
|
RestartSec=10
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
EOF
|
|
|
|
echo "Scanopy setup complete. You can now run: sudo systemctl start scanopy" |