Post Reply 
[Solved]Minimserver not starting automatically on Raspberry Pi
24-01-2014, 08:38
Post: #13
RE: Minimserver not starting automatically on Raspberry Pi
(24-01-2014 01:10)simoncn Wrote:  
(23-01-2014 17:48)guussie Wrote:  Thanks Simon!

I tried this and it worked OK. There is a small problem with the 'stop' command, but automatic startup is working fine. Here is my version of /etc/init.d/minimserver:

Code:
#!/bin/sh
### BEGIN INIT INFO
# Provides:          MinimServer
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start and stop MinimServer
# Description:
### END INIT INFO

case "$1" in
    start)
        su "pi" -c "/home/pi/minimserver/bin/startd"
        ;;
    stop)
        while :
        do
            PID="$(ps -ef | grep m"${ws}"\.jar | grep -v grep | awk '{print $2}')"
            if [ "${PID}" = "" ]; then
                break
            fi
            kill ${PID}
        done
        ;;
    *)
        echo "Usage: $0 start|stop" 1>&2
        exit 3
        ;;
esac

The important difference is the line

su "pi" -c "/home/pi/minimserver/bin/startd"

where you have

su "pi" -c "/home/pi/minimserver/minimserver-0.8.1/bin/startd"

I am wondering if there was a problem when you unpacked the .tar.gz file. The minimserver/bin file should be a symbolic link to the minimserver/minimserver-0.8.1/bin directory. It is important to run all the commands (including setup and startd) from the minimserver/bin directory, not the minimserver/minimserver-0.8.1/bin directory. Here are the contents of my minimserver directory:

Code:
pi@raspberrypi ~ $ ls -l minimserver
total 16
lrwxrwxrwx 1 pi pi   21 Dec 15 21:18 bin -> minimserver-0.8.1/bin
drwxr-xr-x 3 pi pi 4096 Jan 23 23:50 data
lrwxrwxrwx 1 pi pi   23 Dec 15 21:18 icons -> minimserver-0.8.1/icons
lrwxrwxrwx 1 pi pi   21 Dec 15 21:18 lib -> minimserver-0.8.1/lib
drwxr-xr-x 2 pi pi 4096 Dec 15 21:18 libext
drwxr-xr-x 2 pi pi 4096 Dec 15 21:18 libsys
drwxr-xr-x 6 pi pi 4096 Jan 23 23:47 minimserver-0.8.1

Also, the rc*.d links are correct for me. Here's an example:

Code:
pi@raspberrypi ~ $ ls -l /etc/rc2.d
total 4
lrwxrwxrwx 1 root root  17 Jan 23 23:38 K02lightdm -> ../init.d/lightdm
lrwxrwxrwx 1 root root  20 Jan 23 23:23 K06nfs-common -> ../init.d/nfs-common
lrwxrwxrwx 1 root root  17 Jan 23 23:23 K06rpcbind -> ../init.d/rpcbind
-rw-r--r-- 1 root root 677 Jul 14  2013 README
lrwxrwxrwx 1 root root  18 Jan  7 21:06 S01bootlogs -> ../init.d/bootlogs
lrwxrwxrwx 1 root root  17 Jan  7 21:31 S01ifplugd -> ../init.d/ifplugd
lrwxrwxrwx 1 root root  21 Jan 23 23:38 S01minimserver -> ../init.d/minimserver
lrwxrwxrwx 1 root root  14 Jan  7 21:06 S01motd -> ../init.d/motd
lrwxrwxrwx 1 root root  17 Jan  7 21:31 S01rsyslog -> ../init.d/rsyslog
lrwxrwxrwx 1 root root  14 Jan  7 21:31 S01sudo -> ../init.d/sudo
lrwxrwxrwx 1 root root  22 Jan  7 21:31 S01triggerhappy -> ../init.d/triggerhappy
lrwxrwxrwx 1 root root  14 Jan  7 21:31 S02cron -> ../init.d/cron
lrwxrwxrwx 1 root root  14 Jan  7 21:38 S02dbus -> ../init.d/dbus
lrwxrwxrwx 1 root root  24 Jan  7 21:31 S02dphys-swapfile -> ../init.d/dphys-swapfile
lrwxrwxrwx 1 root root  13 Jan  7 21:31 S02ntp -> ../init.d/ntp
lrwxrwxrwx 1 root root  15 Jan  7 21:47 S02rsync -> ../init.d/rsync
lrwxrwxrwx 1 root root  13 Jan 23 23:23 S02ssh -> ../init.d/ssh
lrwxrwxrwx 1 root root  18 Jan  7 21:50 S04plymouth -> ../init.d/plymouth
lrwxrwxrwx 1 root root  18 Jan  7 21:50 S04rc.local -> ../init.d/rc.local
lrwxrwxrwx 1 root root  19 Jan  7 21:50 S04rmnologin -> ../init.d/rmnologin

Dear Simon,

I will try to tinker with this and see if I can get it working.

Since it's working for you, I was thinking whether the installation setup could have made a difference.

I work with a Mac. When I download the .tar.gz file on the Mac, OSX automatically unpacks it into a .tar file.

I then transfer this file to the RPI using the Finder on the Mac (I have previously installed samba on the RPi so I just drag and drop).

Then I unpack that pile, which seems to produce the relevant directories. After that I follow the instructions on your site, so I nave went into 0.8.1.

Could this somehow make a difference?

From my side, I will redo the whole procedure, see what happens and then report back.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Minimserver not starting automatically on Raspberry Pi - guussie - 24-01-2014 08:38

Forum Jump:


User(s) browsing this thread: 1 Guest(s)