Hello,
It's my first time having my own application in the system. Could anyone give me some comment on the way to place the directories in an installation. Thanks.
This is what a release tree look like for my application:
and have /etc/profile.d/myapp.sh so that the application home can be addressed by the interested user as $MYAPP_HOME:
Code:
#/bin/bash
MYAPP_HOME=/usr/myapp
export MYAPP_HOME
But then, to cater for newer releases in the future, or even fallback, I need to keep each release in a separate directory.
Code:
$MYAPP_HOME/release-0001/{bin,ini}
$MYAPP_HOME/release-0002/{bin,ini}
# and a symbolic link to point to the current release.
$MYAPP_HOME/cur -> release-0002
Well then, you might wonder why I didn't set MYAPP_HOME as /usr/myapp/cur instead. It's because the application needs some extra directory for holding data and stuff, as:
Code:
$MYAPP_HOME/data
$MYAPP_HOME/incoming
These directories has files being the same for each release-XXXX. I don't want to move them around or create links inside the release directory.
So, it all comes to the following:
Code:
$MYAPP_HOME/release-0001
$MYAPP_HOME/release-0002
$MYAPP_HOME/cur -> release-0002
$MYAPP_HOME/bin -> cur/bin
$MYAPP_HOME/ini -> cur/ini
# other supporting directories for the installation
$MYAPP_HOME/data -> /var/myapp/data
$MYAPP_HOME/incoming -> /var/myapp/incoming
How is that?
J.