Я установил Бессмертный, и я хотел бы запустить сценарий, содержавшийся в a .sh
файл.
Я попытался смотреть на документы, но я всегда получаю a missing command error
.
Это - то, что я попробовал:
immortal -l /tmp/play-log.log -logger play.sh
С целью запуска a play.sh
сценарий.
Это - использование от immortal -h
Usage: immortal [-v] [-ctl dir] [-d dir] [-e dir] [-f pidfile] [-l logfile] [-logger logger] [-p child_pidfile] [-P supervisor_pidfile] [-u user] command
command
The command with arguments if any, to supervise
-c run.yml
run.yml configuration file
-ctl /var/run/immortal/<service>
Create supervise directory /var/run/immortal/<service>
-d dir
Change to dir before starting the command
-e dir
Set environment variables specified by files in the dir
-f pidfile
Follow PID in pidfile
-l logfile
Write stdout/stderr to logfile
-logger command
A command to pipe stdout/stderr to stdin
-n No daemon mode, stay in the foreground
-P pidfile
Path to write the supervisor pidfile
-p pidfile
Path to write the child pidfile
-r number
number of retries before program exit
-u user
Execute command on behalf user
-v Print version
-w seconds
seconds to wait before starting
Хорошо, будучи sh файлом решение было:
immortal -l ./play-log.txt /bin/sh -c "./play.sh"
или без журнала
immortal /bin/sh -c "./play.sh"