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)
commitaee3275fa50dae3aab22012b11a3aaf1a428a9a1 (patch)
treea1cf4f52b80177c42883ea77fa109466da5c6fee /rhimport.pm
parent888638fb47b9c497534fbe9cffd2e6773d39b8bc (diff)
check for key file before import
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) = @_;