Git Product home page Git Product logo

bath's Introduction

Bath

From the original README:

bath.sh is a shell script that connects to the webpage using curl for instances where a web browser is cumbersome, or just not available.

Dependencies

apache2
apache2-threaded-dev
libapache2-mod-python
python-dev
python-bottle
python-ipaddr

(Almost) Automatic Setup

Run sudo ./deploy.sh
This will do most of the Bath setup after some initial error checking. You may have to update your version of sudo, install apache, edit your sudoers file, or edit your hosts file (see Manual Setup below). If those checks pass, the script will copy all of the files to their correct locations in the file system and do some basic Apache setup.

Manual Setup

  • Copy the files to the correct locations (as dictated by the directory structure)

  • Assuming you've installed Apache, navigate to /etc/apache2 and run: sudo a2enmod ssl

  • Delete/comment out everything in /etc/apache2/ports.conf

  • Add the following line to your /etc/apt/sources.list:

      deb http://backports.debian.org/debian-backports squeeze-backports main
    
  • Run: sudo apt-get update && sudo apt-get -t squeeze-backports install sudo
    This installs a newer version of sudo that doesn't have this bug.

  • Run: su -
    Type in your root password
    Run: visudo

  • Add the following line after any existing defaults:

      Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
    
  • Add the following lines under "# Cmnd alias specification":

      Cmnd_Alias CREATESSH = /sbin/iptables -A INPUT -p tcp -m tcp --dport 22 -m state --state NEW -j REJECT -m comment --comment *  
      Cmnd_Alias ADDSSH = /sbin/iptables -I INPUT -p tcp --dport 22 -m state --state NEW -j ACCEPT -s *  
      Cmnd_Alias DELSSH = /sbin/iptables -D INPUT -p tcp --dport 22 -m state --state NEW -j ACCEPT -s *  
      Cmnd_Alias SHOWSSH = /sbin/iptables -n -L INPUT
    
  • Add the following line under "# User privilege specification":

      www-data ALL=NOPASSWD: CREATESSH, ADDSSH, DELSSH, SHOWSSH
    
  • Save and quit, and log out of root

  • Navigate to /etc/apache2 and run: sudo a2dissite 000-default && sudo a2ensite port443

  • Edit /etc/hosts so that the IP next to your hostname is your IP rather than 127.0.0.1

  • Edit /var/lib/bath/app/libbath.py to return some string (single quotes) after line 22 (the string can be anything)

  • Run: sudo chown -R www-data:www-data /var/lib/bath

  • Run: sudo /etc/init.d/apache2 reload

  • Run: sudo /etc/init.d/apache2 restart

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.