[Unit] # 服务名称,可自定义Description=Mount WebDAV Service (KeePass) After = network.target syslog.target Wants = network.target
[Service] Type = oneshot ExecStart = bash -c 'for i in {1..15}; do if ping -c 1 seto.teracloud.jp; then mount /path/to/dir1/; break; else sleep 1; fi; done' ExecStop = umount /path/to/dir1/ RemainAfterExit = true