aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2009-04-29 19:24:18 +0200
committerMiklos Vajna <vmiklos@frugalware.org>2009-04-29 19:24:18 +0200
commit1b48afb69b4b523cbf51f678936ed7d33f3f6011 (patch)
treee69aed2f887373a04e3c20f87e377af20f098cbd
parentb9f2894f04f3f4793034c43f26c0ded3595017dd (diff)
add support for user-wide config files
in the past the config file was expected in /etc/skyped, change this to ~/.skyped, and just fall back to the previous path if it's not available.
-rw-r--r--skype/README14
-rw-r--r--skype/skyped.py4
2 files changed, 11 insertions, 7 deletions
diff --git a/skype/README b/skype/README
index 73865faf..cda02b53 100644
--- a/skype/README
+++ b/skype/README
@@ -165,10 +165,12 @@ This will install the plugin to where BitlBee expects them, which is
=== Configuring
-- Edit `/usr/local/etc/skyped/skyped.conf`: adjust `username` and `password`. The
- `username` should be your Skype login and the `password` can be whatever you
- want, but you will have to specify that one when adding the Skype account to
- BitlBee (see later).
+- Set up `~/.skyped/skyped.conf`: Create the `~/.skyped` directory, copy
+ `skyped.conf` and `skyped.cnf` from
+ `/usr/local/etc/skyped/skyped.conf` to `~/.skyped`, adjust `username`
+ and `password`. The `username` should be your Skype login and the
+ `password` can be whatever you want, but you will have to specify that
+ one when adding the Skype account to BitlBee (see later).
NOTE: Here, and later - `/usr/local/etc` can be different on your installation
if you used the `--sysconfdir` switch when running bitlbee-skype's `configure`.
@@ -176,12 +178,12 @@ if you used the `--sysconfdir` switch when running bitlbee-skype's `configure`.
- Generate the SSL pem files:
----
-# cd /usr/local/etc/skyped
+# cd ~/.skyped
# openssl req -new -x509 -days 365 -nodes -config skyped.cnf -out skyped.cert.pem \
-keyout skyped.key.pem
----
-NOTE: Maybe you want to adjust the permissions in the `/usr/local/etc/skyped`
+NOTE: Maybe you want to adjust the permissions in the `~/.skyped`
dir. For example make it readable by just your user.
- If both pyopenssl and python-gnutls are available, then python-gnutls
diff --git a/skype/skyped.py b/skype/skyped.py
index 28607a05..254ff67f 100644
--- a/skype/skyped.py
+++ b/skype/skyped.py
@@ -205,7 +205,9 @@ class SkypeApi:
class Options:
def __init__(self):
- self.cfgpath = "/usr/local/etc/skyped/skyped.conf"
+ self.cfgpath = os.path.join(os.environ['HOME'], ".skyped", "skyped.conf")
+ if not os.path.exists(self.cfgpath):
+ self.cfgpath = "/usr/local/etc/skyped/skyped.conf"
self.daemon = True
self.debug = False
self.help = False