summaryrefslogtreecommitdiffstats
path: root/mdkonline
diff options
context:
space:
mode:
Diffstat (limited to 'mdkonline')
-rwxr-xr-xmdkonline7
1 files changed, 7 insertions, 0 deletions
diff --git a/mdkonline b/mdkonline
index 6a39a942..34b5ed6f 100755
--- a/mdkonline
+++ b/mdkonline
@@ -409,4 +409,11 @@ MACHINE=$boxname
COUNTRY=$country
LASTCHECK=$d
);
+ my $user = $ENV{INITIAL_USER} || $ENV{USER};
+ my $confpers = $user eq 'root' ? '/root/.mdkonline' : "/home/$user/.mdkonline";
+ my ($uid, $gid) = (getpwnam($user) || $user, getgrnam($user) || $user);
+ output_with_perm $confpers, 644,
+ qq(AUTOSTART=TRUE
+);
+ chown $uid, $gid $confpers;
}