Sorry to bug you one more time. If the aMule user's home folder can be
changed in /etc/default/amule-daemon, I think that the check that the
aMule user's folder exists should not be made before a stop in order to
be able to modify /etc/default/amule-daemon while amuled is running then
to stop it and move the folder and finally to start it for example. I
don't regard this as mandatory, but why not put those folder checks in
the start function? Eventually the following changes would have to be made:

*** 14,28 ****
        exit 0
  fi

! HOME=`getent passwd $AMULED_USER | awk -F: '{print $6}'`
!
! if [ -z "$HOME" ]; then
!       echo "aMule user does not exists or has no home folder. Check
/etc/default/amule-daemon settings"
!       exit 0
  fi

  start ()
  {
      echo -n "Starting aMule : amuled"
      export HOME
      start-stop-daemon --chuid $AMULED_USER --user $AMULED_USER --start
--exec $DAEMON --background
--- 14,35 ----
        exit 0
  fi

! if [ -z "$AMULED_HOME" ]; then
!       HOME=`getent passwd $AMULED_USER | awk -F: '{print $6}'`
! else
!       HOME=$AMULED_HOME
  fi

  start ()
  {
+     if [ -z "$HOME" ]; then
+       echo "aMule user does not exists or has no home folder. Check
/etc/default/amule-daemon settings"
+       exit 0
+     elif ! [ -d "$HOME" ]; then
+       echo "aMule user's home folder does not exist. Check
/etc/default/amule-daemon settings"
+       exit 0
+     fi
+
      echo -n "Starting aMule : amuled"
      export HOME
      start-stop-daemon --chuid $AMULED_USER --user $AMULED_USER --start
--exec $DAEMON --background

Regards


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to