有些时候开机的自启动服务需要在网卡启动后,在启动,这个时候就需要在开机的服务脚本里面添加参数
[Unit]
Description=ShenTong OSCAR DB Control
After=network.target network-online.target
Requires=network.target network-online.target
[Service]
Type=forking
ExecStart=/opt/ShenTong/admin/oscardb_OSRDBd start
ExecStop=/opt/ShenTong/admin/oscardb_OSRDBd stop
ExecReload=/opt/ShenTong/admin/oscardb_OSRDBd restart
[Install]
WantedBy=graphical.target