Skip to content

Commit c54d7ff

Browse files
committed
PIDFILE referenced to homedir instead of ~
1 parent e6f2236 commit c54d7ff

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

fruho/main.tcl

+2-2
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ proc main {} {
183183
}
184184

185185

186-
set piderr [create-pidfile ~/.fruho/fruho.pid]
186+
set piderr [create-pidfile [model PIDFILE]]
187187
if {$piderr ne ""} {
188188
exit-nosave $piderr
189189
}
@@ -206,7 +206,7 @@ proc main-exit {{arg ""}} {
206206
model save
207207
}
208208
# ignore if problems occurred in deleting pidfile
209-
delete-pidfile ~/.fruho/fruho.pid
209+
delete-pidfile [model PIDFILE]
210210
set ::until_exit 1
211211
catch {close [$::model::Ffconn_sock}
212212
catch {close $::model::Openvpnlog}

fruho/model.tcl

+3
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,9 @@ proc ::model::INIFILE {} {
153153
proc ::model::LOGFILE {} {
154154
return [file join [model CONFIGDIR] fruho.log]
155155
}
156+
proc ::model::PIDFILE {} {
157+
return [file join [model CONFIGDIR] fruho.pid]
158+
}
156159
proc ::model::OPENVPNLOGFILE {} {
157160
return [file join [model CONFIGDIR] openvpn.log]
158161
}

0 commit comments

Comments
 (0)