Class: Foreman::Export::SystemdUser
- Inherits:
-
Base
- Object
- Base
- Foreman::Export::SystemdUser
- Defined in:
- lib/foreman/export/systemd_user.rb
Constant Summary collapse
- TEMPLATE_DIR =
File.("../../../../data/export/systemd_user", __FILE__)
Instance Method Summary collapse
- #app ⇒ Object
- #export ⇒ Object
-
#initialize(location, engine, options = {}) ⇒ SystemdUser
constructor
A new instance of SystemdUser.
- #location ⇒ Object
Constructor Details
#initialize(location, engine, options = {}) ⇒ SystemdUser
Returns a new instance of SystemdUser.
7 8 9 10 11 |
# File 'lib/foreman/export/systemd_user.rb', line 7 def initialize(location, engine, = {}) = .dup [:template] ||= TEMPLATE_DIR super(location, engine, ) end |
Instance Method Details
#app ⇒ Object
13 14 15 |
# File 'lib/foreman/export/systemd_user.rb', line 13 def app [:app] || File.basename(FileUtils.pwd) end |
#export ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/foreman/export/systemd_user.rb', line 21 def export super clean_old_units write_units install_include_dir configure_systemd end |
#location ⇒ Object
17 18 19 |
# File 'lib/foreman/export/systemd_user.rb', line 17 def location super || "#{ENV["HOME"]}/.config/systemd/user" end |