upstart 到 systemd ubuntu16 - 如何转换?

upstart 到 systemd ubuntu16 - 如何转换?

我有来自 Ubuntu 14 的与 upstart 一起工作的脚本,如何将其转换为 systemd 以便它可以在 Ubuntu 16 上运行?

文件:

start on runlevel [2345] and (started tty1 or started ttyS0 or started serial-ttyS0) and started cloud-final
stop on runlevel [06]

console owner

env DX_WRITE=/disk/var/log/dx_write.tmp
env RTE_TARGET=x86_64-wsm-linuxapp-gcc
env RTE_MACHINE=wsm

pre-start script

reset
/opt/roniy/roni/bin/roniyud pre_start 

end script

post-start script
 sleep 30
 stop ttyS0 || true
 stop tty1 || true
end script

post-stop script

/opt/roniy/roni/bin/roniyud post_stop

end script

script

if ! grep ulp_mode /proc/cmdline >/dev/null 2>&1;then
   if [ -f /disk/foo/va_run.sh ];then
      exec taskset 1 /disk/foo/va_run.sh
   else
      exec taskset 1 /disk/foo/bin/initializer_0 va
   fi
fi

end script

相关内容