Update of /cvsroot/tmda/tmda/contrib/cgi
In directory sc8-pr-cvs1:/tmp/cvs-serv20987

Added Files:
        tmda-cgi.c Makefile 
Log Message:
Simple C code and Makefile to create the CGI.  This program is used so if run-
ning in system-wide or single-user mode the user will automatically be set.

See INSTALL for more on operating modes.


--- NEW FILE ---
/* tmda-cgi.c

Copyright (C) 2002 Gre7g Luterman <[EMAIL PROTECTED]>

This file is part of TMDA.

TMDA is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.  A copy of this license should
be included in the file COPYING.

TMDA is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License
along with TMDA; if not, write to the Free Software Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */

#include <stdlib.h>
#include "dirs.h"

int main(int argc, char *argv[])
{
  chdir(INSTALL);
  execl(PYTHON, PYTHON, "tmda-cgi.py", 0);

  return 0;
}

--- NEW FILE ---
# Makefile for tmda-cgi
#
# Copyright (C) 2002 Gre7g Luterman <[EMAIL PROTECTED]>
#
# This file is part of TMDA.
#
# TMDA is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.  A copy of this license should
# be included in the file COPYING.
#
# TMDA is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with TMDA; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

compile: tmda-cgi
        chown `whoami` tmda-cgi
        chmod 4755 tmda-cgi

no-su: tmda-cgi
        chmod 755 tmda-cgi

dirs.h:
        printf '#define PYTHON "%s"\n#define INSTALL "%s"\n' \
        `which python` `pwd` > dirs.h

tmda-cgi: dirs.h tmda-cgi.c
        gcc tmda-cgi.c -o tmda-cgi

_______________________________________
tmda-cvs mailing list
http://tmda.net/lists/listinfo/tmda-cvs

Reply via email to