summaryrefslogtreecommitdiff
path: root/rhimport.pm
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2010-04-19 09:59:24 (GMT)
committerChristian Pointner <equinox@helsinki.at>2010-04-19 09:59:24 (GMT)
commitde92273e6de01bf9bada5cb89d72118943d23b51 (patch)
treea1cf4f52b80177c42883ea77fa109466da5c6fee /rhimport.pm
parentf6bfa62369e2761cb7d1d924227b67352a34cdcc (diff)
check for key file before import
git-svn-id: https://svn.helsinki.at/rhimport/trunk@52 7c65635b-ec39-4f67-a626-873dbafdd612
Diffstat (limited to 'rhimport.pm')
-rw-r--r--rhimport.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/rhimport.pm b/rhimport.pm
index 7bc36cc..df67f74 100644
--- a/rhimport.pm
+++ b/rhimport.pm
@@ -35,6 +35,14 @@ my $ssh_key_file = "$ENV{'HOME'}/.rhimport/import.key";
my $ssh_dir = "/programm/.rhimport";
my $rdimport_wrapper = "/usr/local/bin/dropbox_newfile.pl";
+sub check_key_file
+{
+ if(-e "$ssh_key_file") {
+ return 1;
+ }
+ return 0;
+}
+
sub get_dropboxes
{
my ($dbh, $user) = @_;