|
From: <fcr...@us...> - 2013-01-01 10:35:24
|
Revision: 835
http://safekeep.svn.sourceforge.net/safekeep/?rev=835&view=rev
Author: fcrawford
Date: 2013-01-01 10:35:18 +0000 (Tue, 01 Jan 2013)
Log Message:
-----------
Use ~/.safekeep/ for non-root user if it exists
Modified Paths:
--------------
safekeep/trunk/doc/safekeep.backup.txt
safekeep/trunk/doc/safekeep.conf.txt
safekeep/trunk/doc/safekeep.txt
safekeep/trunk/safekeep
Modified: safekeep/trunk/doc/safekeep.backup.txt
===================================================================
--- safekeep/trunk/doc/safekeep.backup.txt 2013-01-01 08:03:06 UTC (rev 834)
+++ safekeep/trunk/doc/safekeep.backup.txt 2013-01-01 10:35:18 UTC (rev 835)
@@ -11,7 +11,8 @@
SYNOPSIS
--------
-These files are usually placed in `/etc/safekeep/backup.d/` to be picked
+These files are usually placed in `/etc/safekeep/backup.d/`, or optionally
+in `~/.safekeep/backup.d/` for non-root users, to be picked
up automatically by 'safekeep(1)'. They must have a `.backup` extension.
DESCRIPTION
@@ -430,6 +431,7 @@
FILES
-----
/etc/safekeep/backup.d/
+ ~/.safekeep/backup.d/
SEE ALSO
--------
Modified: safekeep/trunk/doc/safekeep.conf.txt
===================================================================
--- safekeep/trunk/doc/safekeep.conf.txt 2013-01-01 08:03:06 UTC (rev 834)
+++ safekeep/trunk/doc/safekeep.conf.txt 2013-01-01 10:35:18 UTC (rev 835)
@@ -11,7 +11,8 @@
SYNOPSIS
--------
-This file resides in `/etc/safekeep/` from where it
+This file resides in `/etc/safekeep/`, or optionally in
+`~/.safekeep/` for non-root users, from where it
will be automatically picked up by 'safekeep(1)'.
DESCRIPTION
@@ -148,6 +149,7 @@
FILES
-----
/etc/safekeep/safekeep.conf
+ ~/.safekeep/safekeep.conf
SEE ALSO
--------
Modified: safekeep/trunk/doc/safekeep.txt
===================================================================
--- safekeep/trunk/doc/safekeep.txt 2013-01-01 08:03:06 UTC (rev 834)
+++ safekeep/trunk/doc/safekeep.txt 2013-01-01 10:35:18 UTC (rev 835)
@@ -88,7 +88,8 @@
-c, --conf=FILE::
Specifies the configuration file location.
If not specified at all, SafeKeep will default to
- `/etc/safekeep/safekeep.conf` if it exists.
+ `/etc/safekeep/safekeep.conf`, or optionally in
+ `~/.safekeep/safekeep.conf` for non-root users, if it exists.
Simply using this default is the recommended usage.
-h, --help::
@@ -194,7 +195,8 @@
-------------
Normally the configuration files are placed in the `/etc/safekeep/backup.d/`
-directory from where they will get picked up automatically by SafeKeep.
+directory, or optionally in `~/.safekeep/backup.d/` for non-root users,
+from where they will get picked up automatically by SafeKeep.
Each backup client is described by a configuration file in XML format.
The minimum configuration file is:
------------------------------------------------------------------------
Modified: safekeep/trunk/safekeep
===================================================================
--- safekeep/trunk/safekeep 2013-01-01 08:03:06 UTC (rev 834)
+++ safekeep/trunk/safekeep 2013-01-01 10:35:18 UTC (rev 835)
@@ -1822,7 +1822,7 @@
except getopt.GetoptError:
usage(2)
- global backup_user, client_user, home_dir, base_dir
+ global backup_user, client_user, home_dir, base_dir, config_file
global verbosity_level
mode = None
@@ -1842,6 +1842,12 @@
keys_print = False
keys_deploy = False
nice_srv = None
+
+ if os.getuid():
+ user_path = os.path.expanduser('~/.safekeep')
+ if os.path.exists(user_path) and os.path.isdir(user_path):
+ config_file = user_path + '/safekeep.conf'
+
for o, a in opts:
if o in ('-c', '--conf'):
if os.path.isdir(a) or a.endswith(config_ext):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|