Giter VIP home page Giter VIP logo

telepathyapi-robot's Introduction

Implement builder and reader classs for packet used in Telepathy API.

Start on boot

A script added to /etc/init.d named "rr".

To make it executable and run on boot.

sudo chmod 755 /etc/init.d/rr
sudo update-rc.d rr defaults

Script

#! /bin/sh
# /home/pi/TelepathyAPI-Robot/startserver.py

### BEGIN INIT INFO
# Provides:          rr
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Simple script to start a program at boot
# Description:       
# From www.stuffaboutcode.com which will start / stop a program a boot / shutdown.
### END INIT INFO

# If you want a command to always run, put it here

# Carry out specific functions when asked to by the system
case "$1" in
  start)
    echo "Starting RollingStone Server"
    # run application you want to start
    screen -d -m -S "rr-server" python3 /home/pi/TelepathyAPI-Robot/startserver.py 
    ;;
  stop)
    echo "Stopping RollingStone Server"
    # kill application you want to stop
    screen -X -S rr-server quit
    ;;
  *)
    echo "Usage: /etc/init.d/rr {start|stop}"
    exit 1
    ;;
esac

exit 0

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.