当我尝试启用systemd
服务时,我得到了
DEBUG[a8223480] Command: ( /usr/bin/env sudo systemctl enable /etc/systemd/system/api.service )
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing on host MY_IP: sudo exit status: 1
当我手动尝试:
时,会发生同样的情况execute :sudo, :ln, '-s', '/etc/systemd/system/api.service', '/etc/systemd/system/multi-user.target.wants/api.service'
甚至当我触摸/etc/systemd/system/multi-user.target.wants/
目录中的文件时。
但是当我登录我的服务器时,我可以执行上述任何命令。
问题出在哪里?