我怎样才能cd /path/to/repo && git pull在systemd服务的ExecStartPre部分?
cd /path/to/repo && git pull
ExecStartPre
我想通了。我也想出了如何使用RVM来做一些rails(y)的东西:
WorkingDirectory=/path/to/repo ExecStartPre=/usr/bin/git pull ExecStartPre=/home/rails/.rvm/bin/rvm 2.3.1 do bundle install ExecStartPre=/home/rails/.rvm/wrappers/ruby-2.3.1/rake assets:precompile