Overland Storage SnapServer Administrator's Manual page 256

Hide thumbs Also See for SnapServer:
Table of Contents

Advertisement

SnapServer GuardianOS 7.2 Administrator's Guide
return 1
else
fi
return 0
}
# usage: 'rmgroup <group_name>'
rmgroup()
{
Delete the Group
# if the group exists then delete it
if $CLI group get group-name="$1" > /dev/null 2>&1; then
echo "Deleting group '$1' ..."
return 1
else
fi
return 0
}
# usage: 'rmshare <share_name>'
rmshare()
{
Delete the Share
# if the share exists delete it
if $CLI share get share-name="$1" > /dev/null 2>&1; then
echo "Deleting share '$1' ..."
return 1
else
fi
return 0
}
Create a User, Group, and Share; Then Add the User to the Group
##############
#
Main
##############
# create a user, a group and a share and add the user to the group
mkuser "$USER" "$PASSWORD"
mkgroup "$GROUP"
adduser2group "$USER" "$GROUP"
mkshare "$SHARE" "$VOLUME"
#remove the group, the user and the share
rmgroup "$GROUP"
rmuser "$USER"
rmshare "$SHARE"
10400317-003 05/2012
if [ $? -ne 0 ]; then
echo "Deletion of user '$1' failed."
fi
echo "User '$1' does not exist."
$CLI group delete group-name="$1" > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "Deletion of group '$1' failed."
fi
echo "Group '$1P' does not exist."
$CLI share delete share-name="$1" > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "Deletion of share '$1' failed."
fi
echo "Share '$1' does not exist."
#
©2010-12 Overland Storage, Inc.
Scripts in SnapCLI
E-12

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SnapServer and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents

Save PDF