summaryrefslogtreecommitdiff
path: root/lognotify.sh
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2010-09-27 05:14:34 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2010-09-27 05:14:34 -0700
commit1b2b62ccd8122c72944dab5fa5f7f6214b1f93f8 (patch)
treeeadd7c6890138c5ac855d099a957406de4b86710 /lognotify.sh
parent055e4ba09cd49b2fb8fdbd2119481e86554e1d81 (diff)
downloadlognotify-1b2b62ccd8122c72944dab5fa5f7f6214b1f93f8.tar.gz
lognotify-1b2b62ccd8122c72944dab5fa5f7f6214b1f93f8.tar.xz
Use config files, less arguments needed.
Diffstat (limited to 'lognotify.sh')
-rwxr-xr-xlognotify.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/lognotify.sh b/lognotify.sh
index ba14cc3..161a50b 100755
--- a/lognotify.sh
+++ b/lognotify.sh
@@ -3,16 +3,16 @@
# Copyright 2010 David Vazgenovich Shakaryan <dvshakaryan@gmail.com>
# Distributed under the terms of the GNU General Public License v3
-if [ $# != 3 ]; then
+CACHEDIR="${HOME}/.cache/lognotify"
+CONFIGDIR="${HOME}/.config/lognotify"
+
+if [ $# != 1 ]; then
echo "$0: incorrect number of arguments" >&2
exit 1
fi
IDENTIFIER="$1"
-SERVER="$2"
-LOGPATH="$3"
-
-CACHEDIR="${HOME}/.cache/lognotify"
+source "${CONFIGDIR}/${IDENTIFIER}"
# Setup cache directory if nonexistent.
if [ ! -d "${CACHEDIR}" ]; then