Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 37

Thread: Optware on the Javelin S4? Possible? Yes it is!!

  1. #21
    Join Date
    Mar 2012
    Posts
    10

    Default

    i have the files i the /opt/etc/init.d directory, but they do not run when the nas restarts. Not sure how to tell if its just failing or if its not running the files.

  2. #22
    Join Date
    Mar 2012
    Location
    NYC, NY
    Posts
    90

    Default

    It should just run, if you want, try adding login to the rc script in /opt/etc/rc.optware (look at the text i added in bold/red bellow)

    #!/bin/sh

    # Start all init scripts in /opt/etc/init.d
    # executing them in numerical order.
    #
    for i in /opt/etc/init.d/S??* ;do

    echo "starting script " $i "\n" >> /tmp/rc.optware.log

    # Ignore dangling symlinks (if any).
    [ ! -f "$i" ] && continue

    case "$i" in
    *.sh)
    # Source shell script for speed.
    (
    trap - INT QUIT TSTP
    set start
    . $i
    )
    ;;
    *)
    # No sh extension, so fork subprocess.
    $i start
    ;;
    esac
    done

  3. #23
    Join Date
    Mar 2012
    Posts
    10

    Default

    thanks for your help with this ruben.

    i added the line and the log files shows that it ran the files but i can't access the web interfaces of each like i can when i run then from the telnet terminal.

    not sure what i'm doing wrong.

    here is the code i have in the file for sabnzdb

    #!/bin/sh
    NAME=sabnzbd

    case "$1" in
    start)
    echo "Starting SABnzbd."
    python2.5 /opt/share/SABnzbd/SABnzbd.py -s 192.168.1.3:8080
    ;;
    stop)
    echo "Shutting down SABnzbd. (api key must be disabled)"
    /usr/bin/wget -q "http://192.168.1.3:8080 /sabnzbd/api?mode=shutdown"
    ;;
    restart)
    "$0" stop
    "$0" start
    ;;
    *)
    echo "Usage: $0 {start|stop|restart}"
    exit 1
    esac

    exit 0

    This is the code in the sickbeard file
    #!/bin/sh
    NAME=sickbeard

    echo "Starting SickBeard."

    python2.5 /opt/share/sickbeard/sickbeard.py

    exit 0

    Let me know if you have any other suggestions...

  4. #24
    Join Date
    Jun 2012
    Posts
    2

    Default

    Quote Originally Posted by ruben00 View Post
    fixed.

    Sorry about that!!
    The link is not working again

  5. #25
    Join Date
    Mar 2012
    Location
    NYC, NY
    Posts
    90

    Default

    fixed the link

  6. #26
    Join Date
    Aug 2012
    Posts
    1

    Default

    i still have some problem right now .. i have installed rooted+ optware on my nas but after perform a reboot on system, if i try to connect on sshd as admin am getted kick out from the session.do you have some idea who i can resolve this issue ?

    thanks

    Miro

  7. #27
    Join Date
    Mar 2012
    Location
    NYC, NY
    Posts
    90

    Default

    you have to add the lines outlined in this post...

    http://www.patriotmemory.com/forums/...0121#post50121

    Rooter was not my work, so I did not want to step on BadIntentions toes and re-write his work.

    If enought people ask for it, I cant make an "Admin SSH Enabler" plugin to go along with Rooter, but for now, the easiest i just to follow the steps above

  8. #28
    Join Date
    Jul 2012
    Posts
    7

    Default

    Quote Originally Posted by ruben00 View Post
    If enought people ask for it, I cant make an "Admin SSH Enabler" plugin to go along with Rooter, but for now, the easiest i just to follow the steps above
    I'd use it. I seem to have a hard time getting settings other than plugins to actually stick after a reboot.

    For that matter, I'd love an explanation for how to automatically start transmission-daemon from optware. I have to manually start it after a reboot and sometimes forget to run it as the right user. I have a script in /opt/etc/init.d that is supposed to start it, but it does nothing AFAICT.

  9. #29
    Join Date
    Mar 2012
    Location
    NYC, NY
    Posts
    90

    Default

    Quote Originally Posted by GDorn View Post
    I'd use it. I seem to have a hard time getting settings other than plugins to actually stick after a reboot.

    For that matter, I'd love an explanation for how to automatically start transmission-daemon from optware. I have to manually start it after a reboot and sometimes forget to run it as the right user. I have a script in /opt/etc/init.d that is supposed to start it, but it does nothing AFAICT.
    Send me your script (make sure you tell me what the filename you are using too, this is important)
    I'll load it up on my Javelin and test it out
    I don't know why unit stuff is not running but I'll try to find out why

    I think I'll make that SSH enabler after all

  10. #30
    Join Date
    Jul 2012
    Posts
    7

    Default

    Quote Originally Posted by ruben00 View Post
    Send me your script (make sure you tell me what the filename you are using too, this is important)
    I'll load it up on my Javelin and test it out
    I don't know why unit stuff is not running but I'll try to find out why

    I think I'll make that SSH enabler after all
    The init.d script I'm using (/opt/etc/init.d/S97transmission):

    Code:
    #!/bin/sh
    
    if [ -f /opt/var/run/transmission-daemon.pid ] ; then
      kill `cat /opt/var/run/transmission-daemon.pid`
    else
      if [ -n "$SSHD_NO_PID_KILLALL" ] ; then
        killall $SSHD_NO_PID_KILLALL
      else
        killall transmission-daemon
      fi
    fi
    
    rm -f /opt/var/run/transmission-daemon.pid
    
    umask 077
    
    transmission-daemon -g /VOLUME1/.config/transmission-daemon
    I did just notice that it's owned by share/smb and not root. But the same is true for /opt/etc/init.id/S40sshd, which might be successfully starting sshd (unless something else is responsible for that).

    I'd be nice to also automatically add arbitrary users to the list of those capable of logging in via ssh, and remove root from that list (I prefer the debian model of logging in as a normal user and only using sudo when necessary).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •