From 9405a5acf470035aed2985f583c9ac386c637ae4 Mon Sep 17 00:00:00 2001 From: elijah Date: Mon, 10 Nov 2014 15:54:22 -0800 Subject: bugfix: pid file was not created correctly on startup. closes #6338 --- bin/tapicero | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/tapicero b/bin/tapicero index 42030d1..d3a9bf8 100755 --- a/bin/tapicero +++ b/bin/tapicero @@ -61,7 +61,7 @@ end # Start the daemon # require 'daemons' -if ENV["USER"] == "root" +if Process::Sys.getuid == 0 options = {:app_name => 'tapicero', :dir_mode => :system} # this will put the pid file in /var/run else options = {:app_name => 'tapicero', :dir_mode => :normal, :dir => '/tmp'} # this will put the pid file in /tmp -- cgit v1.2.3