mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-07-12 00:16:26 +02:00
sigo client api init
This commit is contained in:
parent
d67f354bb4
commit
709521c892
5 changed files with 193 additions and 19 deletions
35
copri4/main/src/scripts/sigo_client.pl
Executable file
35
copri4/main/src/scripts/sigo_client.pl
Executable file
|
@ -0,0 +1,35 @@
|
|||
#!/usr/bin/perl
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# Copyright (c) Rainer Gümpelein, TeilRad GmbH
|
||||
#
|
||||
# sudo su www-data -c "./src/scripts/sigo_client.pl shareedms-fr01 get_bikes"
|
||||
#
|
||||
use vars qw($syshost);
|
||||
|
||||
BEGIN {
|
||||
$syshost = $ARGV[0] || die 'syshost not defined';
|
||||
}
|
||||
|
||||
use lib "/var/www/copri-bike/$syshost/src";
|
||||
use strict;
|
||||
use warnings;
|
||||
use POSIX;
|
||||
use CGI;
|
||||
use Mod::APIsigoclient;
|
||||
use Data::Dumper;
|
||||
|
||||
my $q = new CGI;
|
||||
my $cf = new Config;
|
||||
my $si = new APIsigoclient;
|
||||
my $bw = new Basework;
|
||||
my $lang = "de";
|
||||
my $now_dt = strftime "%Y-%m-%d %H:%M:%S", localtime;
|
||||
|
||||
my $todo = $ARGV[1];
|
||||
|
||||
|
||||
if($todo eq "get_bikes"){
|
||||
$si->get_bikes();
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue