Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Solved]Minimserver not starting automatically on Raspberry Pi
23-01-2014, 17:48
Post: #11
RE: Minimserver not starting automatically on Raspberry Pi
(23-01-2014 17:39)simoncn Wrote:  
(23-01-2014 16:49)guussie Wrote:  Yes, this is what I did. I tried it several times after it did not seem to work.

I will try a fresh installation of this image on a spare SD card, then use the same steps to configure automatic startup. I'll let you know what happens.

Thanks Simon!
Find all posts by this user
Quote this message in a reply
24-01-2014, 01:10
Post: #12
RE: Minimserver not starting automatically on Raspberry Pi
(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
Find all posts by this user
Quote this message in a reply
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
24-01-2014, 10:18
Post: #14
RE: Minimserver not starting automatically on Raspberry Pi
(24-01-2014 08:38)guussie Wrote:  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.

Unpacking the .tar.gz file to a .tar file on the Mac shouldn't cause a problem.

I think the problem is caused by "so I nave went into 0.8.1". The instructions on the website are:

cd /home/pi
tar xf MinimServer-0.8.1-linux-armhf.tar.gz
minimserver/bin/setup

You need to follow these exactly and run minimserver/bin/setup from the /home/pi directory, as I said in a previous post. If the .tar.gz file was unpacked on the Mac, you should do:

cd /home/pi
tar xf MinimServer-0.8.1-linux-armhf.tar
minimserver/bin/setup
Find all posts by this user
Quote this message in a reply
24-01-2014, 12:24
Post: #15
RE: Minimserver not starting automatically on Raspberry Pi
(24-01-2014 10:18)simoncn Wrote:  Unpacking the .tar.gz file to a .tar file on the Mac shouldn't cause a problem.

I think the problem is caused by "so I nave went into 0.8.1". The instructions on the website are:

cd /home/pi
tar xf MinimServer-0.8.1-linux-armhf.tar.gz
minimserver/bin/setup

You need to follow these exactly and run minimserver/bin/setup from the /home/pi directory, as I said in a previous post. If the .tar.gz file was unpacked on the Mac, you should do:

cd /home/pi
tar xf MinimServer-0.8.1-linux-armhf.tar
minimserver/bin/setup

I ran setup from the /home/pi directory and now minim server is starting automatically at startup.

Apologies for wasting your time. I must have ignored your instructions and have started setup from minim server/bin....

Thanks anyway for sorting this out!
Find all posts by this user
Quote this message in a reply
24-01-2014, 12:46
Post: #16
RE: Minimserver not starting automatically on Raspberry Pi
(24-01-2014 12:24)guussie Wrote:  I ran setup from the /home/pi directory and now minim server is starting automatically at startup.

Apologies for wasting your time. I must have ignored your instructions and have started setup from minim server/bin....

Thanks anyway for sorting this out!

No problem! I will see what I can do to make this more robust so things still work if the setup command is run from a different directory.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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