Created
November 11, 2018 16:55
-
-
Save tspspi/005f283aeef883e695922e97e4e887c2 to your computer and use it in GitHub Desktop.
unfs3 rc.d startup script for FreeBSD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Startup script for unfs3 (http://unfs3.sourceforge.net) - inofficial script | |
# | |
# Use in rc.conf: | |
# unfs3d_enable="YES" | |
# | |
# One can override the location of the exports file via | |
# unfs3d_exports="/etc/exports" | |
# | |
# The default exports file is /etc/exports.unfsd | |
. /etc/rc.subr | |
name="unfs3d" | |
unfs3d_export=${unfs3d_export:-"/etc/exports.unfsd"} | |
start_cmd="${name}_start" | |
stop_cmd="${name}_stop" | |
unfs3d_start() | |
{ | |
echo "Starting unfs3d from ${unfs3d_export}" | |
unfsd -e ${unfs3d_export} | |
} | |
unfs3d_stop() | |
{ | |
echo "Stopping unfsd" | |
killall unfsd | |
} | |
load_rc_config $name | |
run_rc_command "$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment