[
    {
        "id": "19c8fc79.3aa35c",
        "type": "udp out",
        "z": "bff85f52.4b372",
        "name": "",
        "addr": "255.255.255.255",
        "iface": "",
        "port": "161",
        "ipv": "udp4",
        "outport": "",
        "base64": false,
        "multicast": "broad",
        "x": 540,
        "y": 880,
        "wires": []
    },
    {
        "id": "b11f334b.a1eda",
        "type": "inject",
        "z": "bff85f52.4b372",
        "name": "",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "1",
        "crontab": "",
        "once": true,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "02:81:cd:61:4a:d0 TMONX-SNMP",
        "payloadType": "str",
        "x": 260,
        "y": 880,
        "wires": [
            [
                "19c8fc79.3aa35c"
            ]
        ]
    },
    {
        "id": "7d1a4b3.446e434",
        "type": "udp in",
        "z": "bff85f52.4b372",
        "name": "",
        "iface": "",
        "port": "162",
        "ipv": "udp4",
        "multicast": "false",
        "group": "",
        "datatype": "utf8",
        "x": 260,
        "y": 940,
        "wires": [
            [
                "eed1fc18.8fa6a8",
                "b8343f0c.2e0078",
                "c950e9e7.849b08"
            ]
        ]
    },
    {
        "id": "eed1fc18.8fa6a8",
        "type": "debug",
        "z": "bff85f52.4b372",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 510,
        "y": 1080,
        "wires": []
    },
    {
        "id": "b8343f0c.2e0078",
        "type": "file",
        "z": "bff85f52.4b372",
        "name": "",
        "filename": "/opt/log.a",
        "appendNewline": true,
        "createDir": false,
        "overwriteFile": "false",
        "encoding": "utf8",
        "x": 560,
        "y": 940,
        "wires": [
            []
        ]
    },
    {
        "id": "c950e9e7.849b08",
        "type": "function",
        "z": "bff85f52.4b372",
        "name": "",
        "func": "\nmsg.payload = \"cat > /etc/network/interfaces<<EOF\\nauto lo\\niface lo inet loopback\\n\\nauto eth0\\nallow-hotplug eth0\\n\\niface eth0 inet static\\n        address \"+ msg.payload +\"\\n        netmask \"+ \"255.255.255.0\" +\"\\n        gateway \"+ \"10.0.0.254\" +\"\\n        dns-nameservers \"+ \"10.0.0.1\" +\"\\nEOF\";\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 560,
        "y": 980,
        "wires": [
            [
                "d2c17298.86ab38"
            ]
        ]
    },
    {
        "id": "d2c17298.86ab38",
        "type": "exec",
        "z": "bff85f52.4b372",
        "command": "",
        "addpay": true,
        "append": "",
        "useSpawn": "false",
        "timer": "",
        "oldrc": false,
        "name": "",
        "x": 710,
        "y": 980,
        "wires": [
            [],
            [],
            [
                "f680fb24.e8a63"
            ]
        ]
    },
    {
        "id": "5642798a.eb66d",
        "type": "delay",
        "z": "bff85f52.4b372",
        "name": "",
        "pauseType": "delay",
        "timeout": "2",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "x": 860,
        "y": 1080,
        "wires": [
            [
                "cb2b7830.c31d8"
            ]
        ]
    },
    {
        "id": "f680fb24.e8a63",
        "type": "function",
        "z": "bff85f52.4b372",
        "name": "",
        "func": "if(msg.payload.code === 0)           \n    msg.payload = \"File modified\";\nelse\n    msg.payload = \"~\";\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 860,
        "y": 1000,
        "wires": [
            [
                "438ced91.b5e154"
            ]
        ]
    },
    {
        "id": "438ced91.b5e154",
        "type": "switch",
        "z": "bff85f52.4b372",
        "name": "",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "neq",
                "v": "~",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 850,
        "y": 1040,
        "wires": [
            [
                "5642798a.eb66d"
            ]
        ]
    },
    {
        "id": "cb2b7830.c31d8",
        "type": "function",
        "z": "bff85f52.4b372",
        "name": "",
        "func": "\n    msg.payload = \"reboot\";\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 860,
        "y": 1120,
        "wires": [
            [
                "b7517d8.29443"
            ]
        ]
    },
    {
        "id": "b7517d8.29443",
        "type": "exec",
        "z": "bff85f52.4b372",
        "command": "",
        "addpay": true,
        "append": "",
        "useSpawn": "false",
        "timer": "",
        "oldrc": false,
        "name": "",
        "x": 850,
        "y": 1180,
        "wires": [
            [],
            [],
            []
        ]
    }
]