6.6. CLI command reference

The following commands can be used on headless systems (without a graphical user interface) to configure and start a server from the command line.

6.6.1. Creating a new repository

Use this command to create a new repository to store your data. An admin user must be specified when creating a new repository. This command is usually ran once when the server is set up.

./fanurio.sh --repository-create "admin-name=Admin,admin-username=admin,admin-email=admin@acme.com,admin-password=123"

Parameters

  • admin-name (optional): the admin user name; if this parameter is missing, you will be prompted to enter a value

  • admin-username (optional): a unique username for the admin user; if this parameter is missing, you will be prompted to enter a value

  • admin-email (optional): an email for the admin user; if this parameter is missing, you will be prompted to enter a value

  • admin-password (optional): the password for the admin user; if this parameter is missing, you will be prompted to enter a value

6.6.2. Restoring a backup

Use this command if you need to restore a backup file. This is also helpful if you need to transfer the repository from an old computer to a new one.

./fanurio.sh --repository-restore /home/john/backup.fro

Parameters

  • the path to a backup file

Requirements

  • the server is not running

6.6.3. Adding a user

Use this command to add new users. This command will ask you to authenticate as an admin. An error will be displayed if the number of active users is equal to the number of licensed users.

./fanurio.sh --user-add "name=John,username=john,email=john@acme.com,role=ADMIN,password=123" 

Parameters

  • name (optional): the user name; if this parameter is missing, you will be prompted to enter a value

  • username (optional): a unique name for the user; if this parameter is missing, you will be prompted to enter a value

  • email (optional): an email for the user; if this parameter is missing, you will be prompted to enter a value

  • password (optional): the password for the user; if this parameter is missing, you will be prompted to enter a value

  • role (optional): must have one of the following values: ADMIN, MANAGER, COWORKER, INDIVIDUAL; if this parameter is missing, you will be prompted to enter a value

Requirements

  • the server is not running

  • a repository was created

  • a server license key was registered

6.6.4. Updating the role of a user

Use this command to change the role for a specific user. This command will ask you to authenticate as an admin.

./fanurio.sh --user-update "username=john,role=INDIVIDUAL"

Parameters

  • username (mandatory): must identify an existing user; if the username doesn't exist, a list of all usernames will be displayed.

  • role (mandatory): must have one of the following values: ADMIN, MANAGER, COWORKER, INDIVIDUAL.

Requirements

  • the server is not running

  • a repository was created

  • a server license key was registered

6.6.5. Changing the status of a user

Use this command to disable or enable access for a specific user. This command will ask you to authenticate as an admin. An error will be displayed if the number of active users exceeds the number of licensed users when an inactive user is made active again.

./fanurio.sh --user-update "username=john,active=false"

Parameters

  • username (mandatory): must identify an existing user; if the username doesn't exist, a list of all usernames will be displayed.

  • active (mandatory): must be true or false

Requirements

  • the server is not running

  • a repository was created

  • a server license key was registered

6.6.6. Running the server

Use this command to start the server. Once started, it can be stopped with CTRL-C.

./fanurio.sh --server

6.6.7. Updating settings

The relevant settings needed to configure the server are grouped below by category.

6.6.7.1. The repository and backup directories

The following settings define where data and backups are stored on disk. These settings are optional and you should change them if you prefer to use different locations than the default ones.

./fanurio.sh --settings-update "repository-dir=/opt/fanurio/,backup-dir=/opt/fanurio/backup"

Parameters

  • repository-dir: the directory used to store the repository; by default, this is ~/.fanurio/ on Linux.

  • backup-dir: the directory used to store automatic backups; by default, this is ~/.fanurio/backup/ on Linux.

Requirements

  • the server is not running

6.6.7.2. The license key

The following settings are used to register a new license key. These settings are mandatory since the server can't run without a registered license key.

./fanurio.sh --settings-update "license-email=john.doe@acme.com,license-file=license.dat" 

Parameters

  • license-email: the email address associated with the license key

  • license-file: the path to the license key file (license.dat)

Requirements

  • the server is not running

6.6.7.3. The server port and address

The following settings are used to configure the server port and address. These settings are optional.

./fanurio.sh --settings-update "server-port=8888,server-address=http://fanurio.acme.com" 

Parameters

  • server-port: the port used to access the server; by default it is set to 8111

  • server-address: the server address used in notification emails

Requirements

  • the server is not running

6.6.7.4. Email notifications

The following settings are used to configure the email address and the SMTP server used to send email notifications. These settings are optional but without them users won't be able to recover passwords by email.

./fanurio.sh --settings-update "email-notification-saved=true,email-notification-folder=INBOX.Sent,email-notification-address=noreply@acme.com,email-notification-smtp-hostname=smtp.gmail.com,email-notification-smtp-port=465,email-notification-smtp-security=SSL,email-notification-smtp-authenticated=true,email-notification-smtp-username=noreply@acme.com,email-notification-smtp-password=123"

Parameters

  • email-notification-saved: true or false; indicates whether notification emails are saved on the server or not. By default, this setting is set to false.

  • email-notification-folder: the path to the email folder used to save notification emails; by default it is set to INBOX.Sent

  • email-notification-address: the email address from which notification emails are sent

  • email-notification-smtp-hostname: the address of the SMTP server

  • email-notification-smtp-port: the port of the SMTP server, must be a number

  • email-notification-smtp-security: use one of the following values: SSL, STARTTLS, NONE

  • email-notification-smtp-authenticated: true or false; if set to true, a username and a password must be specified (see below)

  • email-notification-smtp-username: the username used to connect to the SMTP server if authentication is enabled; if this parameter is missing, you will be prompted to enter a value

  • - email-notification-smtp-password: the password used to connect to the SMTP server if authentication is enabled; if this parameter is missing, you will be prompted to enter a value

Requirements

  • the server is not running