From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1MbNdK-0007Lm-UX for garchives@archives.gentoo.org; Wed, 12 Aug 2009 23:53:31 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 930B3E0464; Wed, 12 Aug 2009 23:53:29 +0000 (UTC) Received: from mail-pz0-f181.google.com (mail-pz0-f181.google.com [209.85.222.181]) by pigeon.gentoo.org (Postfix) with ESMTP id 663FAE0464 for ; Wed, 12 Aug 2009 23:53:29 +0000 (UTC) Received: by pzk11 with SMTP id 11so780624pzk.10 for ; Wed, 12 Aug 2009 16:53:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=16dTtQxNABc6+yXFQsAIUTMW+u2i1dDYXHtmXKvSvc8=; b=q4LRibQ/sn+LCB1xDjklH9+yIhrcfEcHzW6f8jpU6+qivdZUsNxpy8csjSeL/hYY4M KB8/eE+mIVdmrcn4UUzR14MKrhETNy8HRxXs7VPMpnYQcrZp6wdMQuEg9pXnC6tzsYEr qTdKn1WfUHJs3MhPv+I3FgQy1H1TgaBw7pI3g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=tYl+BnzaQEohya8x7l97j2HPNa5TUX789Xs4F6WoA6Uey9MLDlx2JyEbIWCH6ylj5a V3SRWjbeLkX8lQokSC+nQwh1iSQIZYIuskstlTOqt2XWVDw2OeU6yD4W8zx1ig8T+WYn CsBuczaBEeBnsNjbiYJT5yW6jB7Sc7/tZ0Vic= Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.115.81.24 with SMTP id i24mr486540wal.122.1250121208840; Wed, 12 Aug 2009 16:53:28 -0700 (PDT) In-Reply-To: <20090812230258.4f31b6b9@zaphod.digimed.co.uk> References: <49bf44f10908121440o3764f861r6dfddcc4c4ce91c@mail.gmail.com> <20090812230258.4f31b6b9@zaphod.digimed.co.uk> Date: Wed, 12 Aug 2009 16:53:28 -0700 Message-ID: <49bf44f10908121653i404d74acla048ccf31ba5dea1@mail.gmail.com> Subject: Re: [gentoo-user] Starting a daemon automatically without rc-update From: Grant To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: f2ae6be6-1c8d-4dc1-9e6d-74491b5c56a7 X-Archives-Hash: a07e57137d0ff5e515d1143dcc2c2f10 >> I run one program which needs to be started as a particular user >> whenever the system comes up, but there is no ebuild. =A0Is this the >> Gentoo way? >> >> # cat /etc/init.d/rc.local >> #!/sbin/runscript >> >> start() { >> su user >> /path/to/program/binary >> } > > Yes, or you could use > > start() { > =A0su - user -c /path/to/program/binary > } > > which runs the program with the user's full environment instead of > inheriting root's. > > > -- > Neil Bothwick Hmmm, it didn't come back up with the server. I have this in /etc/init.d/rc.local: #!/sbin/runscript depend() { } start() { su - user -c /path/to/binary } stop() { } restart() { } I had to start it like I normally do instead: # su - user $ /path/to/binary What could I be missing? - Grant