error Installing ServiceDesk Plus as a Linux Service on Debian

error Installing ServiceDesk Plus as a Linux Service on Debian

Hi Team,

 

I have followed your procedure (https://help.servicedeskplus.com/introduction/installation-linux.html$method3) and this procedure (https://www.youtube.com/watch?v=7I1kdF-XYfU) but I have the error above at the launch of the service :

 

blvtech@FR-SDM01-KNT:/etc/init.d$ sudo /etc/init.d/servicedesk start

/etc/init.d/servicedesk: 47: /etc/init.d/servicedesk: Syntax error: word unexpected (expecting "in")

Os Version : Debian GNU/Linux 9.11 (stretch)

have you ever encountered this kind of problem?

below my servicedesk file:

### BEGIN INIT INFO
# Provides:          exim4
# Required-Start:    $remote_fs $syslog $named $network $time
# Required-Stop:     $remote_fs $syslog $named $network
# Should-Start:      postgresql mysql clamav-daemon greylist spamassassin
# Should-Stop:       postgresql mysql clamav-daemon greylist spamassassin
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: exim Mail Transport Agent
# Description:       exim is a Mail Transport agent
### END INIT INFO
#!/bin/bash
#
# Startup script for the pmagent
#
# chkconfig: 345 99 02
# description: Run the ServiceDesk-Plus program
INITLOG_ARGS=""
prog="servicedesk"
progname="AdventNet ManageEngine ServiceDesk-Plus"
RETVAL=0
# Edit the following to indicate the 'bin' directory for your installation
MDIR=/opt/ServiceDesk/bin/
if [ ! -d "$MDIR" ]
then
 echo "Invalid directory $MDIR"
    exit 1
fi
start()
{
        mv -f /var/log/servicedesk-plus.log /var/log/servicedesk-plus1.log
echo "Starting $progname"
        cd $MDIR
nohup sh run.sh >/var/log/servicedesk-plus.log 2>&1 &
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch /var/lock/subsys/servicedesk
}

stop()
{
echo "Stopping $progname"
        cd $MDIR
sh shutdown.sh -S >>/var/log/servicedesk-plus.log 2>&1  
}

case "$1" in
 start)
       start
         ;;
 stop)
      stop
        ;;
    *)
     echo "Usage: $prog {start|stop}"
     exit 1
     ;;
esac

exit $RETVAL 






                  New to ADSelfService Plus?