Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OPENHAB_BACKUPS environment variable #76

Merged
merged 2 commits into from Sep 25, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions resources/etc/default/openhab2
Expand Up @@ -24,6 +24,11 @@ EXTRA_JAVA_OPTS=""
#OPENHAB_USERDATA=/var/lib/openhab2
#OPENHAB_LOGDIR=/var/log/openhab2
#
# Set the following variable if you'd like a custom backup location.
# runtime/bin/backup and runtime/bin/restore will use this path for the zip files.
#
#OPENHAB_BACKUPS=/var/lib/openhab2/backups
#
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if you want to move the EXTRA_JAVA_OPTS section to the bottom. Seems weird, that the file starts with that detail.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've left it at the top mainly because it's more likely for someone to want to edit it than any of the paths.

OPENHAB_BACKUPS however, would be a very commonly used variable, so perhaps it should be:

OPENHAB_BACKUPS
OPENHAB_USER
OPENHAB_GROUP

EXTRA_JAVA_OPTS

OPENHAB_STARTMODE

OPENHAB_*

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jup 👍

# The user and group that takes ownership of openHAB. Only available for init.d systems.
# To edit user and group for systemd, see the service file at /usr/lib/systemd/system/openhab2.service.
#
Expand Down
2 changes: 2 additions & 0 deletions resources/etc/init.d/deb/openhab2
Expand Up @@ -26,6 +26,7 @@ if [ -z "${OPENHAB_HOME}" ]; then OPENHAB_HOME="/usr/share/openhab2"; fi
if [ -z "${OPENHAB_CONF}" ]; then OPENHAB_CONF="/etc/openhab2"; fi
if [ -z "${OPENHAB_RUNTIME}" ]; then OPENHAB_RUNTIME="${OPENHAB_HOME}/runtime"; fi
if [ -z "${OPENHAB_USERDATA}" ]; then OPENHAB_USERDATA="/var/lib/openhab2"; fi
if [ -z "${OPENHAB_BACKUPS}" ]; then OPENHAB_BACKUPS="${OPENHAB_USERDATA}/backups"; fi
if [ -z "${OPENHAB_LOGDIR}" ]; then OPENHAB_LOGDIR="/var/log/openhab2"; fi
if [ -z "${OPENHAB_USER}" ]; then OPENHAB_USER="openhab"; fi
if [ -z "${OPENHAB_GROUP}" ]; then OPENHAB_GROUP="openhab"; fi
Expand All @@ -36,6 +37,7 @@ export OPENHAB_HOME
export OPENHAB_CONF
export OPENHAB_RUNTIME
export OPENHAB_USERDATA
export OPENHAB_BACKUPS
export OPENHAB_LOGDIR
export OPENHAB_USER
export OPENHAB_GROUP
Expand Down
2 changes: 2 additions & 0 deletions resources/etc/init.d/rpm/openhab2
Expand Up @@ -26,6 +26,7 @@ if [ -z "${OPENHAB_HOME}" ]; then OPENHAB_HOME="/usr/share/openhab2"; fi
if [ -z "${OPENHAB_CONF}" ]; then OPENHAB_CONF="/etc/openhab2"; fi
if [ -z "${OPENHAB_RUNTIME}" ]; then OPENHAB_RUNTIME="${OPENHAB_HOME}/runtime"; fi
if [ -z "${OPENHAB_USERDATA}" ]; then OPENHAB_USERDATA="/var/lib/openhab2"; fi
if [ -z "${OPENHAB_BACKUPS}" ]; then OPENHAB_BACKUPS="${OPENHAB_USERDATA}/backups"; fi
if [ -z "${OPENHAB_LOGDIR}" ]; then OPENHAB_LOGDIR="/var/log/openhab2"; fi
if [ -z "${OPENHAB_USER}" ]; then OPENHAB_USER="openhab"; fi
if [ -z "${OPENHAB_GROUP}" ]; then OPENHAB_GROUP="openhab"; fi
Expand All @@ -36,6 +37,7 @@ export OPENHAB_HOME
export OPENHAB_CONF
export OPENHAB_RUNTIME
export OPENHAB_USERDATA
export OPENHAB_BACKUPS
export OPENHAB_LOGDIR
export OPENHAB_USER
export OPENHAB_GROUP
Expand Down
2 changes: 2 additions & 0 deletions resources/etc/profile.d/openhab2.sh
Expand Up @@ -13,6 +13,7 @@ if [ -z "${OPENHAB_HOME}" ]; then OPENHAB_HOME="/usr/share/openhab2"; fi
if [ -z "${OPENHAB_CONF}" ]; then OPENHAB_CONF="/etc/openhab2"; fi
if [ -z "${OPENHAB_RUNTIME}" ]; then OPENHAB_RUNTIME="${OPENHAB_HOME}/runtime"; fi
if [ -z "${OPENHAB_USERDATA}" ]; then OPENHAB_USERDATA="/var/lib/openhab2"; fi
if [ -z "${OPENHAB_BACKUPS}" ]; then OPENHAB_BACKUPS="${OPENHAB_USERDATA}/backups"; fi
if [ -z "${OPENHAB_LOGDIR}" ]; then OPENHAB_LOGDIR="/var/log/openhab2"; fi
if [ -z "${OPENHAB_USER}" ]; then OPENHAB_USER="openhab"; fi
if [ -z "${OPENHAB_GROUP}" ]; then OPENHAB_GROUP="openhab"; fi
Expand All @@ -24,6 +25,7 @@ export OPENHAB_CONF
export OPENHAB_RUNTIME
export OPENHAB_USERDATA
export OPENHAB_LOGDIR
export OPENHAB_BACKUPS
export OPENHAB_USER
export OPENHAB_GROUP