vic-samapp-upr1:/# cat -n /sbin/rc3.d/S823hpws22_apache
1 #!/sbin/sh
2 #
3 # @(#) $Revision: 82.1 $
4 #
5 # NOTE: This script is not configurable! Any changes made to this
6 # script will be overwritten when you upgrade to the next
7 # release of HP-UX.
8 #
9 # WARNING: Changing this script in any way may lead to a system that
10 # is unbootable. Do not modify this script.
11 #
12 # The Apache script is used for starting up the Apache webserver
13 # by default at boot-up time.
14 # Configurable options are:
15 # HPWS22_APACHE_HOME
16 # HPWS22_APACHE_START
17 # These options can be supplied in /etc/rc.config.d/hpws22_apacheconf file.
18 #
19 # Allowed exit values:
20 # 0 = success; causes "OK" to show up in checklist.
21 # 1 = failure; causes "FAIL" to show up in checklist.
22 # 2 = skip; causes "N/A" to show up in the checklist.
23 # Use this value if execution of this script is overridden
24 # by the use of a control variable, or if this script is not
25 # appropriate to execute for some other reason.
26 # 3 = reboot; causes the system to be rebooted after execution.
27 # 4 = background; causes "BG" to show up in the checklist.
28 # Use this value if this script starts a process in background mode.
29 # Input and output:
30 # stdin is redirected from /dev/null
31 #
32 # stdout and stderr are redirected to the /etc/rc.log file
33 # during checklist mode, or to the console in raw mode.
34 export PATH=/usr/sbin:/usr/bin:/sbin
35 # Assume "excluded"
36 rval=2
37 # source the system configuration variables
38 if [ -f /etc/rc.config ] ; then
39 . /etc/rc.config
40 else
41 echo "ERROR: /etc/rc.config defaults file MISSING"
42 fi
43 export HPWS22_APACHE_HOME
44 case $1 in
45 'start_msg')
46 echo "Starting HP-UX Apache-based Web Server"
47 ;;
48 'stop_msg')
49 echo "Stopping HP-UX Apache-based Web Server"
50 ;;
51 'start')
52 # Apache will be started in ssl mode by default.
53 # Execute the command to start Apache
54 if [ $HPWS22_APACHE_START -eq 1 ]; then
55 # Execute the commands to start apache
56 $HPWS22_APACHE_HOME/bin/apachectl start 1>/dev/null 2>&1
57 if [ $? -ne 0 ]; then
58 echo "ERROR: Could not start Apache"
59 else
60 rval=0
61 echo "Apache Started.."
62 fi
63 fi
64 ;;
65
66 'stop')
67 # Execute the commands to stop apache
68 $HPWS22_APACHE_HOME/bin/apachectl stop 1>/dev/null 2>&1
69 rval=0
70 ;;
71 *)
72 echo "usage: $0 {start|startssl|stop|start_msg|stop_msg}"
73 rval=1
74 ;;
75 esac
76 exit $rval
vic-samapp-upr1:/#
Moderator's Comments:
I've modified your post to include line numbers. Please use code tags.
New in Unix, I am adding a line "route add 57.14.y.y 57.14.x.x" every day after rebooting the system. Where can I add the line so during boot up (the system is re-started every day by design (???) the line is executed? (I tried the /etc/rc2.d/S90 but for some reason the line needs to be added... (2 Replies)
Hello there!
I need help.
Everytime I login to my ssh, i see this:
-bash: .export: command not found
-bash: .export: command not found
-bash: .export: command not found
-bash: .export: command not found
any help ?
thanks (0 Replies)
I'm having these weird errors.
svc.configd: Fatal error: Backend copy failed: fails to read from /etc/svc/repository.db at offset 106496: Bad file number
svc.configd: Fatal error: unable to create "boot" backup of "/etc/svc/repository.db"
Mar 10 13:04:23 svc.startd:... (5 Replies)
Hi
I need the below script to be started whenever I reboot my aix server ?
#cat cdbegin
/cdirect/cdunix/ndm/bin/cdpmgr -i /cdirect/cdunix/ndm/cfg/cbspsdb01/initparm.cfg
Please suggest how to add this to the startup ? (2 Replies)
Good morning!
I'm trying to add Maven to the system boot by the moment without success.
Testing the operation of the script I realize that the process isn't persistent when the program is launched with the start option.
---- #Startup Script ----
#! /bin/sh
# chkconfig: 345 99 1
#... (5 Replies)
I copied the script from an AskUbuntu post -
#!/bin/bash
### BEGIN INIT INFO
# Provides: tomcat7
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start/Stop Tomcat server
### END INIT INFO
... (14 Replies)
can someone spot what i'm doing wrong here:
awk 'BEGIN{printf("%0.2f", 1 / 2649320) * 100}'
i get this error:
awk: line 1: syntax error at or near *
then i do this and get the answer i'm trying to avoid:
awk 'BEGIN{print(1 / 2649320) * 100}'
3.77455e-05 (7 Replies)
The attached file is a copy of my rc.local. The rc.local script appears to execute as the tightvncserver gets started. However the nodemon process does not start. The element nodemon is a symlink to nodemon and the path is correct.
I have a little start script located in the... (3 Replies)