GithubHelp home page GithubHelp logo

iitg_connect_bash_script's Introduction

IITG Network login bash script.
Run script either Manually or As a Cron jobs or As a Systemd service.

Dependency:

  1. Bash Shell (defautl in linux)
  2. curl installed (default in most linux distro)

steps to run on a bash shell (Manually).

Step 1.
Place the script file (.sh) in home directory (recommended). \

Step 2.
Open the .sh file with any text editor and Add your login credentials specified in the script.

Screenshot 2024-01-07 at 17 54 35

Step 3.
Run the script as sudo user with the following command.

  sudo bash iitgconnect.sh

For exit you can just press 'ctrl+c', it will logged you out.

steps to run as a systemd service.

Step 1. Create a systemd service with the follwing command.

  sudo nano /etc/systemd/system/iitgconnect.service

Step 2. Add the following lines to editor opened.

Make sure to add correct path to your script file.
For eg, if your username is "abc" then your path will be "/home/abc/iitgconnect.sh".

[Unit]
Description=IITG autologin bash script file

[Service]
ExecStart=/path/to/your/script.sh 
Restart=always  # This line enables automatic restart
RestartSec=10   # Time to wait before restarting, in seconds
TimeoutSec=30   # Timeout second for stopping the service befor forcefully killing with SIGKILL

[Install]
WantedBy=multi-user.target
  

Step 3. Reload systemd for the changes to take effect.

  sudo reload systemd for the changes to take effect

Step 4. Enable the service to start automatically on startup.

  sudo systemctl start iitgconnect.service

Step 5. To check the status, type the following command.

  sudo systemctl status iitgconnect.service

Done!!

iitg_connect_bash_script's People

Contributors

ranjankuldeep avatar

Watchers

 avatar

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.