I can help you create a script to automatically configure your Wago CC100 edge controller. Since the Web-Based-Management interface is just a frontend, there should be underlying configuration files and services that can be modified directly via SSH.
Here's a general approach to discover and implement the configuration:
1. First, investigate the current configuration
Connect via SSH and explore the system to understand how Docker and NTP are configured:
# Check current service status
systemctl status docker
systemctl status ntp
# or
systemctl status ntpd
systemctl status systemd-timesyncd
# Look for configuration files
find /etc -name "*docker*" -type f 2>/dev/null
find /etc -name "*ntp*" -type f 2>/dev/null
# Check if there are Wago-specific configuration directories
ls -la /etc/wago/
ls -la /opt/wago/
2. Monitor changes when enabling via Web UI
To understand what the Web-Based-Management does, you can monitor file changes:
# Before enabling in Web UI, create a snapshot of relevant files
find /etc -type f -exec md5sum {} \; > /tmp/before.txt
# Enable Docker and NTP through the Web UI
# After enabling, check what changed
find /etc -type f -exec md5sum {} \; > /tmp/after.txt
diff /tmp/before.txt /tmp/after.txt
# Also check for recently modified files
find /etc -type f -mmin -5
3. Basic automation script structure
Based on what you discover, your script might look something like this:
#!/bin/bash
# Script to configure Wago CC100
set -e
echo "Starting Wago CC100 configuration..."
# Enable Docker
echo "Enabling Docker..."
# This might involve:
# - Modifying a configuration file
# - Creating symlinks
# - Enabling the service
# Example (adjust based on your findings):
systemctl enable docker
systemctl start docker
# Enable NTP
echo "Enabling NTP..."
# This might involve:
# - Modifying /etc/ntp.conf or /etc/systemd/timesyncd.conf
# - Configuring NTP servers
# - Enabling the service
# Example (adjust based on your findings):
cat > /etc/ntp.conf << EOF
server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
driftfile /var/lib/ntp/drift
EOF
systemctl enable ntp
systemctl start ntp
# Wait for services to be ready
sleep 5
# Verify services are running
if systemctl is-active --quiet docker; then
echo "Docker is running"
else
echo "ERROR: Docker failed to start"
exit 1
fi
if systemctl is-active --quiet ntp; then
echo "NTP is running"
else
echo "ERROR: NTP failed to start"
exit 1
fi
# Pull and run your containers
echo "Deploying containers..."
docker pull your-image:tag
docker run -d --name your-container your-image:tag
echo "Configuration complete!"
4. Wago-specific considerations
Wago devices often have specific configuration mechanisms:
- Check for
/etc/specific/wago-config or similar proprietary configuration files
- Look for Wago-specific utilities in
/usr/sbin/ or /opt/wago/bin/
- Some Wago devices use a configuration daemon that needs to be notified of changes
5. Alternative approach using the Web API
If direct file modification proves difficult, you might be able to automate the Web-Based-Management interface:
# Example using curl to interact with the web interface
# You'll need to inspect the network traffic to find the exact endpoints
curl -X POST http://device-ip/api/config/docker \
-H "Content-Type: application/json" \
-d '{"enabled": true}'
Would you like me to help you with any specific part of this process once you've gathered more information about your CC100's configuration structure?