GithubHelp home page GithubHelp logo

cpanel_admin's Introduction

cPanel Management

A set of utility scripts to bulk manage cPanel accounts/domains.

Setup

  1. Install Python 3
  2. Install virtualenv python -m pip install virtualenv
  3. Create a new virtual environment python -m virtualenv .venv
  4. Activate the virtual environment source .venv/bin/activate (linux) .venv\Scripts\activate.bat (Windows)
  5. Install python packages pip install -r requirements.txt

Usage

  1. Set server details, username, and API token in .env file
  2. Setup csv file with user details
  3. Activate the virtual environment source .venv/bin/activate (linux) .venv\Scripts\activate.bat (Windows)
  4. Call required python script with csv file as input (e.g. python create_accounts.py --debug --plan 2023_students new_accounts.csv)
  5. Check csv files in output folder for successful/unsuccessful API calls

Creating Accounts

usage: create_accounts.py [-h] [--output] [--plan PLAN] [--debug] input

bulk add accounts to cPanel

positional arguments:
  input                 csv file to load input usernames and emails from

optional arguments:
  -h, --help            show this help message and exit
  --plan PLAN, -p PLAN  the cPanel plan (package) to create the account with
  --debug, -v           print debug messages to the terminal

csv file spec

username email
t1-test [email protected]
etc.

SSL functions

csv file spec

username domain
t1test t1test.panel.uwe.ac.uk
etc.

Update SSL Certificates

usage: update_ssl.py [-h] [--redirect] [--debug] pem_file accounts_file

bulk update SSL certificates on cPanel accounts

positional arguments:
  pem_file        PEM file to load key and certificate(s) from
  accounts_file   csv file to load accounts from (username and domain required)

optional arguments:
  -h, --help      show this help message and exit
  --redirect, -r  enable http->https redirection on domains
  --debug, -v     print debug messages to the terminal

Check SSL certificate expiry dates

usage: ssl_expiry.py [-h] input

Check SSL expiry date on domains in a csv file

positional arguments:
  input       csv file to load domains from

optional arguments:
  -h, --help  show this help message and exit

cpanel_admin's People

Contributors

owenjones avatar

Watchers

 avatar  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.