我正在尝试在 Debian 8 上设置 systemd 服务以在启动时从网络运行程序,但它不起作用 - 该服务在安装 NFS 磁盘完成之前启动。我有以下设置:
# cat /etc/auto.master | grep -v "#"
+dir:/etc/auto.master.d
+auto.master
/fs-1 /etc/auto.fs-1
# cat /etc/auto.fs-1
shared -nosuid,nodev fs-1:/shared
ls -l / | grep shared
lrwxrwxrwx 1 root root 12 Oct 19 14:33 build -> /fs-1/shared
# cat /usr/lib/systemd/system/psr_25.service
[Unit]
Description=PSR 2.5 Server
Wants=network.target network-online.target autofs.target
After=network.target network-online.target autofs.target
RequiresMountsFor=/shared/psr/25/bin
[Service]
Type=forking
User=testuser
ExecStart=/shared/psr/25/bin/server
TimeoutSec=300
[Install]
WantedBy=multi-user.target
如何让服务在 /shared 安装后启动?