]> cvs.zerfleddert.de Git - rsbs2/commitdiff
add configfile option to specify port and enable SSL
authorMichael Gernoth <michael@gernoth.net>
Wed, 11 Feb 2009 07:25:18 +0000 (08:25 +0100)
committerMichael Gernoth <michael@gernoth.net>
Wed, 11 Feb 2009 07:25:18 +0000 (08:25 +0100)
SSL doesn't work correctly yet, dies somewhere in Crypt::SSLeay

README.txt
rsbs2.pl
rsbs2rc

index 8677475719a61d6a003f8b377ff96c13c36df14c..46d1217e8e845e02c76b6e16753020c92860ab4a 100644 (file)
@@ -34,7 +34,7 @@ Linux notes:
    If you don't do this, the bootup process will take a long time but finally
    succeed.
  * Install required perl packages:
-   apt-get install libwww-perl libxml-simple-perl
+   apt-get install libwww-perl libxml-simple-perl libcrypt-ssleay-perl
 
 Pinout:
   +---------------+---------------+--------------------------------------+---+-
index cb0534a5605c4ea6f7e888a6f4e488c69929339e..fcd433eb80bb46cdef8db593a037cefc381aeb8e 100755 (executable)
--- a/rsbs2.pl
+++ b/rsbs2.pl
@@ -689,7 +689,18 @@ my $host = ${$Config{$hostalias}}{"host"};
 $poweronms = ${$Config{$hostalias}}{"poweronms"} if (defined(${$Config{$hostalias}}{"poweronms"}));
 $poweroffms = ${$Config{$hostalias}}{"poweroffms"} if (defined(${$Config{$hostalias}}{"poweroffms"}));
 
-$url = "http://${host}";
+my $ssl = ${$Config{$hostalias}}{"ssl"};
+my $port = ${$Config{$hostalias}}{"port"};
+
+if (defined($ssl) && (lc($ssl) eq 'yes')) {
+       $ENV{HTTPS_DEBUG} = 1;
+       $ENV{HTTPS_VERSION} = 3;
+       $port = 443 if (!defined($port));
+       $url = "https://${host}:${port}";
+} else {
+       $port = 80 if (!defined($port));
+       $url = "http://${host}:${port}";
+}
 
 if ($gui) {
        spawn_gui($url);
diff --git a/rsbs2rc b/rsbs2rc
index 5e0cf93173b937d3b76309e0bfd64c4b4de4d24c..86bd1cc05a8dbd489eae5b7bfe22ca3ac86ff9d2 100644 (file)
--- a/rsbs2rc
+++ b/rsbs2rc
@@ -4,5 +4,7 @@
 host=192.168.50.6
 user=admin
 pass=admin
+;port=80
+;ssl=no
 ;poweronms=200
 ;poweroffms=5000
Impressum, Datenschutz