16 lines
327 B
Bash
Executable File
16 lines
327 B
Bash
Executable File
#!/bin/sh
|
|
|
|
dir=$(dirname "$0")
|
|
|
|
cd $dir
|
|
|
|
APP="http_logger"
|
|
|
|
PID=$(ps -o pid= -C $APP | sed 's/^[ \t]*//')
|
|
if [ -z "$PID" ]; then
|
|
nohup ./$APP &
|
|
PID=$(ps -o pid= -C $APP | sed 's/^[ \t]*//')
|
|
echo "Процесс $APP был запущен ($PID)."
|
|
else
|
|
echo "Процесс $APP уже запущен ($PID)."
|
|
fi |