Put the conditonal statement in a bash script and escape the "$"s with "\".
(make executable)
Code:
#!/bin/sh
#Module1
if ping -c 1 -W 2 192.168.1.1 > /dev/null; then
echo "\${color grey}Module_1: \${color green}Success\${color}"
else
echo "\${color grey}Module_1: \${color red}Failed\${color}"
fi
#Module2
if ping -c 1 -W 2 192.168.1.2 > /dev/null; then
echo "\${color grey}Module_2: \${color green}Success\${color}"
else
echo "\${color grey}Module_2: \${color red}Failed\${color}"
fi
Then call the script in conky using your path to script.
Code:
${execpi 10 /path/to/script}
Bookmarks