Le 03/04/2012 09:51, Hans Bakker a écrit :
Hi Nicolas,
thanks you for your comments. see below
On 04/03/2012 02:12 PM, Nicolas Malin wrote:
Hi hans,
Just some suggests
@@ -32,14 +32,18 @@ OFBIZDIR="ofbiz"
# Start OFBiz
start() {
+ if [ "$USER" = "" ]; then
+ echo "Mounting data disk at boottime here"
+# mount /dev/sdg /data
+ fi
It's not a specific server configuration ?
that is why the mount is commented out.
On amazon EC2 you have to mount your external disks before they can be
used.
Ok I understand, I propose :
+# # Uncomment for cloud configuration
+# if [ "$USER" = "" ]; then
+# echo "Mounting data disk at boottime here"
+# mount /dev/sdg /data
+# fi
running
if [ "$OFBIZ_PROCS" = "" ]; then
echo "Ofbiz is already running..."
return 0
fi
if [ "$USER" = "$OFBIZUSER" ]; then
- echo "starting standard ~/$OFBIZDIR/startofbiz.sh"
- cd ~/$OFBIZDIR
+ echo "starting standard
/home/$OFBIZUSER/$OFBIZDIR/startofbiz.sh"
+ cd /home/$OFBIZUSER/$OFBIZDIR
I propose to replace "/home/$OFBIZUSER/$OFBIZDIR" by
OFBIZ_LOCATION = "/home/$OFBIZUSER/$OFBIZDIR"
and use like :
cd $OFBIZ_LOCATION
It's will be easier to change the ofbiz location especially if you
have various ofbiz on same server ;)
user and ofbiz drectoiry are both important:
1. OFBIZUSER is the user running the instance and should be tested if
the script is running as the user
2. OFBIZDIR is the directory of that specific user
Right, my suggest isn't to remove these variable but just concat the
location.
if you run more than one instance, you should run them under different
users.
Why, it's a politic system architecture not a best practice. Some system
administrator prefer deploy on one user. If the script manage different
solution, it will be even more used :)
Nicolas
Nicolas
--
Nicolas MALIN
Consultant
Tél : 06.17.66.40.06
Site projet : http://www.neogia.org/
-------
Société LibrenBerry
Tél : 02.48.02.56.12
Site : http://www.librenberry.net/