Class: Helpers::NewSystemd

Inherits:
NewFile
  • Object
show all
Defined in:
lib/amnesie/helpers.rb

Instance Method Summary collapse

Methods inherited from NewFile

#perm

Constructor Details

#initialize(string, name) ⇒ NewSystemd

Returns a new instance of NewSystemd.



47
48
49
50
51
# File 'lib/amnesie/helpers.rb', line 47

def initialize(string, name)
  super
  @systemd_dir = search_systemd_dir
  @dest = @systemd_dir + "/" + @name
end

Instance Method Details

#addObject



53
54
55
56
57
# File 'lib/amnesie/helpers.rb', line 53

def add
  @systemctl = Helpers::Exec.new("systemctl")
  super
  @systemctl.run("daemon-reload")
end