预启动 systemd 用户进程

预启动 systemd 用户进程

我已经配置好了启动resque-first.target、然后resque-metro.target和最后resque-prisma.target,但由于某种原因,它们都同时启动

systemctl --user cat resque-worker.target
# /home/deploy/.config/systemd/user/resque-worker.target
[Unit]
Requires=resque-metro.target resque-prisma.target
systemctl --user cat resque-metro.target
# /home/deploy/.config/systemd/user/resque-metro.target
[Unit]
Description=METRO [staging]
[email protected]
[email protected]
Requires=resque-first.target
After=resque-first.target
PartOf=resque-worker.target

[Install]
RequiredBy=resque-worker.target
systemctl --user cat resque-prisma.target
# /home/deploy/.config/systemd/user/resque-prisma.target
[Unit]
Description=PRISMA [staging]
[email protected]
Requires=resque-first.target
After=resque-first.target
PartOf=resque-worker.target

[Install]
RequiredBy=resque-worker.target
systemctl --user cat resque-first.target
# /home/deploy/.config/systemd/user/resque-first.target
[Unit]
Description=MAIL [staging]
[email protected] 
[email protected] 
[email protected] 
[email protected] 
PartOf=resque-metro.target resque-prisma.target

[Install]
RequiredBy=resque-metro.target resque-prisma.target

我如何运行 resque-first.target,然后运行 ​​resque-metro.target,最后运行 resque-prisma.target?

相关内容