我刚刚将服务器从 Ubuntu 14.10 升级到 15.04,并且我通过自定义 upstart 脚本启动的一些服务不再运行。
我的理解是我需要将它们重新编写为systemd服务,但是systemd一夜之间学习整个系统的想法有点令人生畏。
upstart 脚本只是autossh在启动时启动,我还有其他几个类似的脚本可以启动长时间运行的进程。
#/etc/init/autossh.conf
description "Maintain a permanent SSH tunnel to <other_server>"
start on started mountall
stop on shutdown
exec autossh -N other_server
Run Code Online (Sandbox Code Playgroud)
如何将其重写为systemd服务?