]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - argeo-node/rpm/usr/sbin/argeoctl
6 echo Argeo default node
13 echo Argeo instance
$INSTANCE
14 if [ -z "$INSTANCE_DIR" ]; then
15 INSTANCE_DIR
=$HOME/.local
/share
/$APP.d
/$INSTANCE
17 if [ -z "$CONF_DIR" ]; then
18 CONF_DIR
=$HOME/.config
/$APP.d
/$INSTANCE
20 EXEC_DIR
=$INSTANCE_DIR
21 # Make sure minimal files are available
22 if [ ! -f $CONF_DIR/$APP.ini
]; then
23 cp /etc
/$APP/$APP.ini
$CONF_DIR
25 if [ ! -f $CONF_DIR/log4j.properties
]; then
26 cp /etc
/$APP/log4j.properties
$CONF_DIR
31 if [ -z "$JVM" ]; then
35 # Directories and files
37 BASE_POLICY_ALL
=/usr
/share
/$APP/all.policy
38 BASE_CONFIG_INI
=/usr
/share
/$APP/config.ini
40 CONF_DIRS
=$CONF_DIR/conf.d
41 DATA_DIR
=$EXEC_DIR/data
42 CONF_RW
=$EXEC_DIR/state
43 CONFIG_INI
=$CONF_RW/config.ini
45 # A2 sources can be overridden in *.ini files
47 OSGI_INSTALL_AREA
=/usr
/share
/osgi
/boot
48 OSGI_FRAMEWORK
=$OSGI_INSTALL_AREA/org.eclipse.osgi.jar
51 if [ -f $CONF_DIR/settings.sh
];then
52 .
$CONF_DIR/settings.sh
63 printf "## Equinox configuration - Generated by /usr/sbin/argeoctl ##\n\n" > $CONFIG_INI
64 cat $BASE_CONFIG_INI >> $CONFIG_INI
65 printf "\n##\n## $CONF_DIR/$APP.ini\n##\n\n" >> $CONFIG_INI
66 cat $CONF_DIR/$APP.ini
>> $CONFIG_INI
67 # Concatenate additional .ini files
68 if [ -d "$CONF_DIRS" ]; then
69 for file in `ls -v $CONF_DIRS/*.ini`; do
70 printf "\n##\n## $file\n##\n\n" >> $CONFIG_INI
71 cat $file >> $CONFIG_INI
77 -Dlog4j.configuration
="file:$CONF_DIR/log4j.properties" \
78 $JAVA_OPTS -jar $OSGI_FRAMEWORK \
79 -Dargeo.osgi.sources
=$A2_SOURCES \
80 -configuration "$CONF_RW" \
86 echo Not yet implemented
98 echo $
"Usage: $0 {start|reload}"