BACKGROUND
Linux has a set of "run levels", usually 0-6. They are in some ways equivalent to the windows "Safe mode".
RL=0 the system immediately shut down
RL=1 single user mode
RL=2 multi user mode without networking
RL=3 muti user mode with networking (the most common state)
Associated with each runlevel is a set of startup scripts.
They are stored in the /etc/rc.d folder and subfolders of rc0.d, rc1.d, rc2.d, rc3.d, etc
When the system boots up, any scripts inside of the matching run level folder are executed once. There also is a file /etc/rc.local where you can specify startup commands - it also is executed on reboot
CONFIGURATION
It's up to the sysadmin which method they would prefer to use.
/etc/rc.local is a simple way to get Analyze to start, but the sysadmin might wish to do it on only certain runlevels, etc.
To start Analyze, the rc.local script needs to execute the Analyze launch command, but it needs to do so as the Analyze application user - by default rc.local is run as root - so that Analyze has the correct permissions.
So rc.local (or one of the rc3.d scripts) needs to execute this command:
su - <appuser> -c <installdir>/bin/launchData360Analyze.sh >/home/<appuser>/boot.txt 2>&1
boot.txt writes standard output to the file
2>&1 writes standard errors to the same file
Because this script's name or requirements might change from time to time with various Analyze upgrades, it's somewhat better to create a script in the application user's home folder:
/home/<appuser>/S99d3sa_server
And then in rc.local, use this:
su - <appuser> -c /home/<appuser>/S99d3sa_server >/home/<appuser>/boot.txt 2>&1
This way, the application user has control over exactly what is executed, without having to go back to a sysadmin in case some new command requirement is added on some future Analyze upgrade.
A sample S99 script is attached. It will need to be edited for your local installation.
ALTERNATIVE
The other choice, should your sysadmin require that the process be a bit more secure (not allow the end-user to make changes), is to take the attached S99 script and place it directly into /etc/rc.d/rc3.d
This script does a rudimentary level of logging and notification - given your unique requirements, you may wish to alter what it does.
Note: it's important that the command above uses DASHES (character #45, 0x2d).
MS-word and MS-excel convert that character to Unicode "long dashes", and those are not recognized by Linux.
For more information, see https://support.infogix.com/hc/en-us/articles/360025253253-How-to-restart-Data360-Analyze-on-reboot-in-Linux
Comments
0 comments
Please sign in to leave a comment.