[Unit]
Description=NFS server and services
Requires=network.target proc-fs-nfsd.mount rpcbind.target rpc-mountd.service
Wants=rpc-idmapd.service rpc-statd.service rpc-statd-notify.service
Before=rpc-statd-notify.service
After=network.target proc-fs-nfsd.mount rpcbind.target rpc-idmapd.service rpc-statd.service

[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/etc/default/nfs-utils
ExecStartPre=/sbin/exportfs -r
ExecStart=/sbin/rpc.nfsd $NFSD_OPTS
ExecStop=/sbin/rpc.nfsd 0
ExecStopPost=/sbin/exportfs -au
ExecStopPost=/sbin/exportfs -f
ExecReload=/sbin/exportfs -r

[Install]
WantedBy=multi-user.target
