init
This commit is contained in:
53
setup-scanopy.sh
Executable file
53
setup-scanopy.sh
Executable file
@@ -0,0 +1,53 @@
|
||||
#!/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"
|
||||
Reference in New Issue
Block a user