#!/bin/bash
value=$(<man.txt)
echo "$value"
if [ "$value" == "true" ]; then
echo "startedif_manthan"
ps -ef|grep sym |awk '{ print $2 }'|sudo xargs kill -9;
sleep 30;
sudo sh /var/www/symmetric-ds-3.1.6/bin/sym --port 8082 --server;
fi
I have this script killing a process and restart the script in some time. It is killing the script normally but the restart script sudo sh /var/www/symmetric-ds-3.1.6/bin/sym --port 8082 --server
is not running properly.
When I run the script manually also it is giving problems. I don't know whether it is a shell script or not. But when I tried to go manually to the script location and execute this command ./sym --port 8082 --server
the script running normally.
Any suggestions?