SUMMARY: Startup scripts for non-root users?

From: <jreed_at_wukon.appliedtheory.com>
Date: Fri, 01 Oct 1999 16:50:07 -0400

The consensus seems to be to use the /sbin/rc3.d/* format, and in it to use:

        su - <username> -c "startupscript"

John Losey noted:

"Some of the times, we also had to add a:
. /usr/users/<username>/.profile"


Jim Fitzmaurice sent an example script:
#! /bin/sh
#
# dbora:
#

case "$1" in
'start')
        echo "Starting Oracle and Listener"
        sleep 10
        if [ -f /usr/ora1/oracle/bin/lsnrctl ] ; then
        su - oracle -c "/usr/ora1/oracle/bin/lsnrctl start"
        su - oracle -c "/usr/ora1/oracle/bin/lsnrctl dbsnmp_start"
        fi
        if [ -f /usr/ora1/oracle/bin/dbstart ] ; then
        su - oracle -c /usr/ora1/oracle/bin/dbstart
        fi
        ;;
'stop')
        if [ -f /usr/ora1/oracle/bin/dbshut ] ; then
        su - oracle -c /usr/ora1/oracle/bin/dbshut
        fi
        ;;
esac

and Miguel Fliguer sent an example from Ingres:

 su $ING_USER -c \\
 "$II_SYSTEM/ingres/utility/iistartup \\
  $II_SYSTEM" >/dev/console

Thanks to all who replied!


-- 
Judith Reed
jreed_at_appliedtheory.com
(315) 453-2912 x335
Received on Fri Oct 01 1999 - 20:52:00 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:39 NZDT