initial version

This commit is contained in:
Phani Pavan K
2025-11-26 14:24:31 +05:30
parent fba402ac5b
commit 21fee06c86
2 changed files with 286 additions and 0 deletions

68
jconf Normal file
View File

@@ -0,0 +1,68 @@
#! /bin/bash
# JConf, a JupyterHub user manager. Manages system users and links them with jupyterhub accounts.
# Version 0.1 - 24th Nov, 2025
# MIT Licensed, by The Grammer Society
# required options:
# setup: must be run after downloaded. Will create a new venv in /opt, installs jupyterhub, lab and notebook. Checks if npm is installed, then installs configurable http server, installs itself to /usr/bin. Installs service file, enables and starts it. Adds root to admins.
# adduser: creates a system user, asks for password, calls jupyterhub api to create a new user, adds penv to user, su user, penv init and penv creates a default environment. Also copy some instructions in readme file.
# deluser: deletes jupyterhub user, deletes user home, deletes user profile from system.
# start: starts the server, systemd call
# stop: stops the server, systemd call
title() {
echo "JConf: JupyterHub Configuration Manager."
}
usage() {
echo "Must run as root."
echo "Usage: jconf <command> <args>"
echo ""
echo "User Management Commands:"
echo " - adduser <name>"
echo " - deluser <name>"
echo " - listusers"
echo ""
echo "Server Management Commands:"
echo " - start"
echo " - stop"
echo " - install"
echo " - uninstall"
}
if [ "$#" -lt 1 ]; then
title
usage
exit 1
fi
cmd=$1
case "$cmd" in
adduser)
echo
;;
deluser)
echo
;;
listusers)
echo
;;
start)
echo
;;
stop)
echo
;;
install)
echo
;;
uninstall)
echo
;;
*)
echo
;;
esac