ShellScript‎ > ‎

if statement

One liner if statement that would start an ssh tunnel if the process is not found

#!/bin/sh
if ps -u oracle u | grep -q "/usr/bin/ssh ora@oracleserver -R 1521:db3:1521 -N"; then exit; else /etc/init.d/tun-oracle start ; fi

Comments