Permalink
Browse files

/etc/fruhod/current cleanup on OvpnExit

  • Loading branch information...
pulpofred
pulpofred committed Apr 5, 2016
1 parent 8f3ad0e commit 651e6484cc1c85dd18bbb41d43b55be52e82e2de
Showing with 5 additions and 1 deletion.
  1. +1 −1 fruho/main.tcl
  2. 0 fruhod/exclude/etc/fruhod/current/CURRENT_CONNECTION_FILES
  3. +4 −0 fruhod/main.tcl
@@ -121,7 +121,7 @@ proc restore-stdout {} {
proc main {} {
try {
unix relinquish-root
# every created file by the app should be private
# files created by the app (regular user) should be readable by root (fruhod)
umask 0033
redirect-stdout
@@ -217,6 +217,7 @@ proc adjust-config {conf} {
}
proc copy-replace-path-current {conf opt} {
file mkdir /etc/fruhod/current
set path [lindex [::ovconf::get $conf $opt] 0]
if {$path ne ""} {
set tail [file tail $path]
@@ -490,6 +491,9 @@ proc OvpnExit {code} {
if {[ovpn-pid] != 0} {
ffwrite ctrl "OpenVPN with pid [ovpn-pid] stopped"
}
file delete -force /etc/fruhod/current
dns-restore
model reset-ovpn-state
}

0 comments on commit 651e648

Please sign in to comment.