| 330 | } |
| 331 | |
| 332 | func (n *NFSServerSetup) removeChattrCronJob(username string) error { |
| 333 | cronPath := filepath.Join(nfsCronDir, fmt.Sprintf("%s-chattr", username)) |
| 334 | if err := os.Remove(cronPath); err != nil && !os.IsNotExist(err) { |
| 335 | return fmt.Errorf("failed to remove cron file -> %w", err) |
| 336 | } |
| 337 | color.PrintHint("✔ remove chattr cron job: %s", cronPath) |
| 338 | return nil |
| 339 | } |
| 340 | |
| 341 | func (n *NFSClientSetup) updateFSTabEntry(serverExport, mountPoint string) error { |
| 342 | fstabEntry := fmt.Sprintf("%s %s nfs rw,_netdev,noatime,rsize=1048576,wsize=1048576 0 0", serverExport, mountPoint) |