update to make passwd file toggle-able

This commit is contained in:
Michael (Parker) Parker
2023-12-18 14:25:48 -05:00
parent cc0dca4c84
commit 752b779d1f
2 changed files with 12 additions and 9 deletions

View File

@@ -27,12 +27,18 @@ func (s *Server) Mounts() []environment.Mount {
Source: s.Filesystem().Path(),
ReadOnly: false,
},
{
}
// Mount passwd file if set to true
if config.Get().System.User.Passwd {
passwdMount := environment.Mount{
Default: true,
Target: "/etc/passwd",
Source: "/etc/pterodactyl/passwd",
ReadOnly: true,
},
}
m = append(m, passwdMount)
}
// Also include any of this server's custom mounts when returning them.