lib/ladder_drive/tasks/build.rb in ladder_drive-0.6.3 vs lib/ladder_drive/tasks/build.rb in ladder_drive-0.6.4
- old
+ new
@@ -110,10 +110,10 @@
cp_r File.join(template_dir, fname), fname, verbose:false
# copy lddrive.serive file to /etc/systemd/system
fname = "lddrive.service"
s = File.read(File.join(template_dir, fname))
- s.gsub!("<%= exec_start %>", "/home/pi/project/lddrive")
+ s.gsub!("<%= exec_start %>", "#{Dir.pwd}/lddrive")
File.write File.join("/etc", "systemd", "system", fname), s
# reload services
system("systemctl daemon-reload")