Koozali.org: home of the SME Server

Legacy Forums => Experienced User Forum => Topic started by: gbl on October 19, 2004, 09:29:21 PM

Title: Bash: Create Ibay
Post by: gbl on October 19, 2004, 09:29:21 PM
I'm trying crate an ibay on SME 6 from bash script with

Code: [Select]
# --- Create iBay

#!/bin/bash
##
##Adapted from http://www.contribs.com/contribs/nightspirit/RPM-scripts/ibays-create.txt
##


IBAY=testibay

echo
echo "creating ibay '$IBAY'"
/sbin/e-smith/db accounts set $IBAY ibay Name $IBAY

minUid=$(/sbin/e-smith/db configuration get MinUid)
let "uid=minUid+1"
while grep -q :$uid:$uid: /etc/passwd
do
  let uid=uid+1
done

/sbin/e-smith/db accounts setprop $IBAY Uid $uid Gid $uid
/sbin/e-smith/db accounts setprop $IBAY PublicAccess local
/sbin/e-smith/db accounts setprop $IBAY UserAccess wr-group-rd-group
/sbin/e-smith/db accounts setprop $IBAY PasswordSet no CgiBin enabled
/sbin/e-smith/db accounts setprop $IBAY Group Admin
/sbin/e-smith/signal-event ibay-create $IBAY


Deleting the ibay after run this script the server-manager shows an error but the ibay is deleted. What is wront with my script?