gpt4 book ai didi

linux - 如何使用 inittab 自动重启 PHP 程序?

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:43:05 26 4
gpt4 key购买 nike

似乎它有一个 respawn 参数,

但是我还没弄明白怎么用。

最佳答案

比如

mine:234:respawn:/usr/local/bin/myscript

查看此页面以获得很好的解释

http://aplawrence.com/Unixart/startup.html

一个更详细的例子:

# Level to run in
id:2:initdefault:

# Boot-time system configuration/initialization script.
si::sysinit:/etc/rc.sysinit

# What to do in single-user mode.
~:S:wait:/sbin/sulogin

# /etc/init.d executes the S and K scripts upon change
# of runlevel.
#
# Runlevel 0 is halt.
# Runlevel 1 is single-user.
# Runlevels 2-5 are multi-user.
# Runlevel 6 is reboot.

l0:0:wait:/etc/rc 0
l1:1:wait:/etc/rc 1
l2:2:wait:/etc/rc 2
l3:3:wait:/etc/rc 3
l4:4:wait:/etc/rc 4
l5:5:wait:/etc/rc 5
l6:6:wait:/etc/rc 6

# What to do at the "3 finger salute".
ca::ctrlaltdel:/sbin/shutdown -t3 -r now

# Runlevel 2,3: getty on virtual consoles
# Runlevel 3: mgetty on terminal (ttyS0) and modem (ttyS1)
1:23:respawn:/sbin/mingetty tty1
2:23:respawn:/sbin/mingetty tty2
3:23:respawn:/sbin/mingetty tty3
4:23:respawn:/sbin/mingetty tty4
S0:3:respawn:/sbin/agetty ttyS0 9600 vt100-nav
S1:3:respawn:/sbin/mgetty -x0 -D ttyS1

关于linux - 如何使用 inittab 自动重启 PHP 程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/937160/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com