Sponsored Content
Full Discussion: Version checking
Top Forums Shell Programming and Scripting Version checking Post 303022450 by bakunin on Saturday 1st of September 2018 02:26:26 AM
Old 09-01-2018
Quote:
Originally Posted by indeed_1
problem is I have 10 different version of “app”, in different path with different “config file”!
[SNIP]
The only way that i can get path of executable file and related config file is to run below command:

Code:
root ~: ps aux | grep app
/home/user1/app    bind          /home/user1/config1
/usr/app                   bind         /home/user5/config2
/tool/app                  bind         /opt/config3

...
First off: what a mess! My suggestion is to standardise these app versions first: create a directory for every version and put respective version plus its config file there. Something like this:

Code:
/opt/myapp/
            .../version1/
            .../version1/app
            .../version1/config
            .../version2/
            .../version2/app
            .../version2/config

To have a path like /tool is already questionable but to put an application there and its config into /opt is a sure-fire recipe for disaster. It may be a lot of work but you should clean that up as soon as possible.

If you have one config for several versions create one (maybe somewhere else) and use symbolic links like Neo suggested to represent them at the respective directory. Something like:

Code:
/opt/myapp/
            .../configs/
            .../configs/version1-3
            .../configs/version4-6
            .../version1/
            .../version1/app
            .../version1/config -> /opt/myapp/configs/version1-3
            .../version2/
            .../version2/app
            .../version2/config -> /opt/myapp/configs/version1-3
...
            .../version4/
            .../version4/app
            .../version4/config -> /opt/myapp/configs/version4-6

The application would still address these as file "config" in the same directory as the application.

I hope this helps.

bakunin
 

9 More Discussions You Might Find Interesting

1. UNIX Desktop Questions & Answers

checking of GNU C Complier version

Hi, How do i check the GNU C Complier my system is running? thanks jennifer (2 Replies)
Discussion started by: jennifer
2 Replies

2. UNIX for Dummies Questions & Answers

checking for non-zero value

I have a process that spits out a file called sqlplus.out, here is what the result looks like: Currently the value you see is zero, what I need to do is perform an action if that value is non-zero, so how do I check that value in an if statement? If it helps at this moment in development the... (6 Replies)
Discussion started by: philplasma
6 Replies

3. AIX

checking the version revisions of a java file inside the ear using KSHELL in AIX.

consider on day1, in PVCS repository we have java files like a.java,b.java with version revision 1.0, through ANT build script we have compiled and created an ear,named c.ear in AIX build server.we have transfered this ear from build server to portal server through FTP using KSHELL. consider... (0 Replies)
Discussion started by: kareemaashik
0 Replies

4. Solaris

Migrate unix version 8 to version 9

i have a program writing in PRO C which currently running in unix version 8 tie with oracle 8i, but in the future company gonna migrate this OS to version 9. Anything i have to prepare for my PRO C program to run in unix version 9? or anything would that impact my program couldn't run well? what... (2 Replies)
Discussion started by: lsy
2 Replies

5. UNIX for Advanced & Expert Users

Advanced Search * View * Edit JAVA version to WORK in GLASSFISH Forum topic JAVA version

Would like to confirm the ff. I got confused actually with the version I needed to download that will work on glassfish 3.0.1 a. Debian Squeeze (HP DL360). Need to use java version6 On Debian, I did apt-get install sun-java6-jdk. So when I check it's java version "1.6.0_22" Java(TM) SE... (1 Reply)
Discussion started by: lhareigh890
1 Replies

6. SCO

Stop boot system at "Checking protected password and checking subsystem databases"

Hi, (i'm sorry for my english) I'm a problem on boot sco unix 5.0.5 open server. this stop at "Checking protected password and checking subsystem databases" (See this image ) I'm try this: 1) http://www.digipedia.pl/usenet/thread/50/37093/#post37094 2) SCO: SCO Unix - Server hangs... (9 Replies)
Discussion started by: buji
9 Replies

7. Shell Programming and Scripting

Copy a file from directroy/ prior version to the directory/ new version

How to copy a file from directroy/ prior version to the directory/ new version automatically. (4 Replies)
Discussion started by: roy1912
4 Replies

8. AIX

Checking xlc compiler version

Hi, Below is output of lslpp command. bash-3.00# lslpp -L | grep xlC xlC.aix50.rte 11.1.0.1 C F XL C/C++ Runtime for AIX 5.3 xlC.cpp 9.0.0.0 C F C for AIX Preprocessor xlC.msg.en_US.cpp 9.0.0.0 C F C for AIX... (2 Replies)
Discussion started by: manoj.solaris
2 Replies

9. Red Hat

OS version and Firmware version

Guys, How to find OS version and firmware version in LINUX? Like in AIX. uname -a will show me the version 5.3, 6.1,7.1. lsmcode -c will show me - system firmware image as SF240_417. What are the similar commands in Linux. I checked uname -a and cat /etc/release. uname... (1 Reply)
Discussion started by: ElizabethPJ
1 Replies
YAFAPPLICATION(3)							 1							 YAFAPPLICATION(3)

The YafApplication class

INTRODUCTION
Yaf_Application provides a bootstrapping facility for applications which provides reusable resources, common- and module-based bootstrap classes and dependency checking. Note Yaf_Application implements the singleton pattern, and Yaf_Application can not be serialized or unserialized which will cause problem when you try to use PHPUnit to write some test case for Yaf. You may use @backupGlobals annotation of PHPUnit to control the backup and restore operations for global variables. thus can solve this problem. CLASS SYNOPSIS
Yaf_Application final Yaf_Application Properties o protected$config o protected$dispatcher o protectedstatic$_app o protected$_modules o protected$_running o protected$_environ Methods o publicstatic void Yaf_Application::app (void ) o public void Yaf_Application::bootstrap ([Yaf_Bootstrap_Abstract $bootstrap]) o public Yaf_Application Yaf_Application::clearLastError (void ) o private void Yaf_Application::__clone (void ) o public Yaf_Application::__construct (mixed $config, [string $envrion]) o public void Yaf_Application::__destruct (void ) o public void Yaf_Application::environ (void ) o public void Yaf_Application::execute (callable $entry, string $...) o public Yaf_Application Yaf_Application::getAppDirectory (void ) o public Yaf_Config_Abstract Yaf_Application::getConfig (void ) o public Yaf_Dispatcher Yaf_Application::getDispatcher (void ) o public string Yaf_Application::getLastErrorMsg (void ) o public int Yaf_Application::getLastErrorNo (void ) o public array Yaf_Application::getModules (void ) o public void Yaf_Application::run (void ) o public Yaf_Application Yaf_Application::setAppDirectory (string $directory) o private void Yaf_Application::__sleep (void ) o private void Yaf_Application::__wakeup (void ) PROPERTIES
o $config - o $dispatcher - o $_app - o $_modules - o $_running - o $_environ - PHP Documentation Group YAFAPPLICATION(3)
All times are GMT -4. The time now is 06:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy