The main way to use ameh is through the command-line script ameh, which includes several subcommands for doing various tasks. Run ameh with no arguments to get help, or ameh <command> with no arguments to get help on a particular command.


All ameh commands are designed to be run as a normal user, without requiring root access. It’s recommended that you use sudo only when you actually need elevated permissions for something.


Atlassian products tend not to include /etc/init.d scripts for starting, stopping, or checking the status of your applications. The init command aims to remedy this by providing an init-script generator:

$ ameh init jira

#!/bin/sh -e
# /etc/init.d/jira

# [runlevels] [start order] [stop order]
# chkconfig: 2345 80 20
# description: jira


case "$1" in
        echo "Starting $APP"
        /bin/su -m $USER -c "$START &> /dev/null"
        echo "Stopping $APP"
        /bin/su -m $USER -c "$STOP &> /dev/null"
        $0 stop
        sleep 5
        $0 start
        echo "Usage: $0 {start|restart|stop}"
        exit 1

This command simply generates an init-script based on the settings you have configured in /etc/ameh.ini, and prints it on standard output. This way you, being a responsible sysadmin, can review everything it does before installing it into your /etc/init.d folder. To do that, you can pipe into a tee command with elevated permissions:

$ ameh init jira | sudo tee /etc/init.d/jira

You may need to customize the resulting script for your particular environment, but this will at least give you a starting point.


Jira, Confluence, and other Atlassian products have configuration files scattered all over the place. It can be tedious trying to remember where each one is. The config command can help you keep track of them.

When you run ameh config <app>, all of the properties defined in the [app] section of your /etc/ameh.ini file are printed. For example, you might get something like:

$ ameh config jira
jira install: /opt/atlassian/jira
jira start: /opt/atlassian/jira/bin/
jira stop: /opt/atlassian/jira/bin/
jira home: /var/atlassian/application-data/jira-home
jira classes: /opt/atlassian/jira/atlassian-jira/WEB-INF/classes
jira db: /var/atlassian/application-data/jira-home/dbconfig.xml

Some of these are configuration files, and others are directories or shell scripts. If it’s configured, it’s printed here. Let’s say you want to modify your database configuration, and you don’t remember which file that’s in:

$ ameh config jira db

To edit this file, you can simply surround that command in backticks:

$ vim `ameh config jira db`

Or, if you need elevated permissions:

$ sudo vim `ameh config jira db`

Project Versions

Table Of Contents

Previous topic


Next topic


This Page