Announcement

Collapse
No announcement yet.

Help with startup script - Debian

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help with startup script - Debian

    Ok... I'm running Debian, and having a bit of a problem here. I need a script that runs from init.d to be able to start as someone other than root. I've been playing around with su - username -c "/cantrememberpath/mserv" || exit 0

    But it just won't do it. It'll at least start that way, but i can't shut it down, can't do anything, it just sits there displaying the garbage from the prog on the screen. It doesn't finish running the rest of the scripts... am I retarded? Should I be starting it from somewhere else? without the su stuff, it starts fine, it just doesn't work because it's not designed to run as root.

    I am by no means a linux dude, I'm definitely an uber-noob. Man this stuff is different...
    Tidder

    Try RevFE
    The best resurrected frontend I've ever used, period.


    I Wish I could ban people

  • #2
    nobody eh?
    Tidder

    Try RevFE
    The best resurrected frontend I've ever used, period.


    I Wish I could ban people

    Comment


    • #3
      no need to reply to yourself...

      try putting this script in /etc/init.d/mserv

      Code:
      #!/bin/sh
      su nobody
      /cantrememberpath/mserv
      exit 0
      and symlink

      Code:
      for i in {1..5};
      do ln -s /etc/init.d/mserv /etc/rc$i.d/mserv;
      done;

      Comment


      • #4
        Originally posted by blk
        no need to reply to yourself...
        But I like it.
        Originally posted by blk
        try putting this script in /etc/init.d/mserv

        Code:
        #!/bin/sh
        su nobody
        /cantrememberpath/mserv
        exit 0
        I'll try it right now.
        Originally posted by blk
        and symlink

        Code:
        for i in {1..5};
        do ln -s /etc/init.d/mserv /etc/rc$i.d/mserv;
        done;
        I'm guess I'm a little unknowing on this. Where does this go?
        Tidder

        Try RevFE
        The best resurrected frontend I've ever used, period.


        I Wish I could ban people

        Comment


        • #5
          Heh, nevermind.
          Tidder

          Try RevFE
          The best resurrected frontend I've ever used, period.


          I Wish I could ban people

          Comment


          • #6
            Didn't work. Says to me "no job control in this shell".
            Tidder

            Try RevFE
            The best resurrected frontend I've ever used, period.


            I Wish I could ban people

            Comment


            • #8
              If it's just an issue of not continuing with the init scripts, and if it's not a dependency of something else, you can probably just add a &

              su - username -c "/cantrememberpath/mserv" &

              -Link

              Comment


              • #9
                or you might have problems with permissions. post results of this:
                ls -l /cantrememberpath/mserv
                Progress: [|||||||||||||--]:

                forum.bustedtuners.com

                Comment


                • #10
                  Thanks, but I figured it out guys, I ended up using a proggy called rungetty. Worked perfect.

                  Heh, sorry for the late reply.
                  Tidder

                  Try RevFE
                  The best resurrected frontend I've ever used, period.


                  I Wish I could ban people

                  Comment

                  Working...
                  X