I need to make a control panel for a Linux script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting I need to make a control panel for a Linux script
# 1  
Old 09-21-2014
I need to make a control panel for a Linux Database- using jsch

has anyone got experience using jsch?

Does it give me a prompt when I run a command/ print result back to me.

I need to send commands to a linux database like restart,shutdown,stop database caching etc.


But in java I want to build a GUI I can use. TO call database commands. and do these server audits and commands.

I need to Use ssh as its only thing available. With using install on the servers I might not be allowed to due to SLAs. But issuing commands to the database by ssh one at a time is easier through pre-saved servers commands to directly communicate with the server.

Thanks.


Sorry for the little detail earlier!

Last edited by Samuel12; 09-21-2014 at 01:15 PM..
# 2  
Old 09-21-2014
Hello Sam

Given i understood you properly, and beeing the author of it, i'd like to suggest TUI.
Now TUI is basicly a bash based Text User Interface, and for what i understand, you might like tui-browser of if.

Let me explain what tui-browser does...
The 'most simple' method, once installed, is to change to the directory and just call tui-broser.
Of course, that could also be passed using '-p /path/to/base'.

From there on, that dir will be the 'base' dir, showing folders as sections, and files as action.
You could either go without arguments for 'text' mode, or "-m num" for numeric.
Text mode would require you to type the [file/folder]name but also enable you to pass argumetns, numeric would be an easy 'select' menu.
See screenshot example (blue, white lines and those '# |' at the sides) which shows the numeric mode, 'back' and 'quit' beeing available at all stages.

By placing a file called 'default.info' within a folder, it'll show up as text above the selection menu. That way, once can inform the user about anything special regarding that section/task.

Options available:
Code:
tui-browser (0.5)
Advanced File Browser for the cli, based on TUI
Usage: 	tui-browser [options]
Where options are:
	-h(elp)		This screen
	-b(lacklist)	ARG	TODO
	-d(ir)  	ARG	Folders will be labled as ARG
	-C(onfig)	FILE	Full path to configfile of the project
	-D(efault)	NAME	Changes the filename startings from 'default' to 'NAME'
				These files will be hidden from the menu, and according to their
				extension be called on diffrent purposes...
				default.info	- Will be shown upon folder entry
				default.cmd	- Will be executed upon folder entry
	-f(ile) 	ARG	Files will be labled as ARG
	-l(ocation)  	ARG	Location will be labled as ARG
	-m(ode) 	ARG	Can be 'text' (nice n' slow, default)
				or 'num' (functional n' fast)
	-p(ath)		ARG	Will use ARG as basedir
	-n(oclear)		Dont clear screen after menu actions
	-s(ource)	PATH	Sources all files in that dir, or that one file
	-t(itle)	ARG	Title-label (upper-left) is set to ARG
	-u(ser) 	ARG	User-label (upper-right) is set to ARG

Note that this is work in progress, almost done though, and the last major fix i need to write next is to empty the vars of the (if passed, found, exported) CONFIG and SOURCE arguments.

The GIT repositry supplies an 'install.sh' script, and if the server's redhat based, the repo might do the trick too, and be more update friendly either.
Code:
[FedoraPeople-sea]
name=sea's devel packages
baseurl=http://sea.fedorapeople.org/repo
enabled=1
gpgcheck=0

Hope i understood you right, and that this helps.
NOTE: Must be installed on the server and called after ssh connection.
Have a nice weekend Smilie


EDIT:
DOH there has been much of an edit of you.. very few text compared to first text ?!

EDIT2:
Understand, the screenshot is of a work in progress project of mine, which just happens to use tui-browser too, and just by accident (regarding this thread) showing that ssh-demo-info.
TUI does not come with ANY kind of SSH relation.
Sorry cant help with jsch.
I need to make a control panel for a Linux script-ds-ssh-info-demojpg

Last edited by sea; 09-21-2014 at 04:05 AM..
# 3  
Old 09-21-2014
Hey Thanks for the reply!

What I am thinking more of is the following.

Pre-Made scripts saved on my linux servers. I then through a java program on my company network ssh to and run scripts remotely. and issue commands like stop database, restart. It needs to be SSH due to SLA, Based on recet though I might be able to get away with SSH and put emails and alerts in the scripts that tell me by mail what is going on status by status updates flow.

I am not a java guy but I heard of Jsch- you can provide a linux SSH link and provide commands to the linux machine. --> without installing sometihng on the machine as well.
From what I understand its ssh.

Have you heard of it or think it can do the following through SSH only.

---------- Post updated at 12:19 PM ---------- Previous update was at 12:13 PM ----------

sea can you comment again I have added more detail and thanks for the response but I don't need something like a tui browser.

does anyone know if jsch be used without installing on the host of the scripts? From what i read its ssh so the protocol should be enough right?

---------- Post updated at 12:20 PM ---------- Previous update was at 12:19 PM ----------

FYI were 100% redhat

---------- Post updated at 12:23 PM ---------- Previous update was at 12:20 PM ----------

this will be production and across all dev/qa/all environments basically this is a control panel gui to remotely send commands like a total of 10, ranging from --stoop database. database status. restart database.. stop database on node or do some other commands.

---------- Post updated at 12:26 PM ---------- Previous update was at 12:23 PM ----------

something like this i know this must be based on jsch

More Than User: raspberry pi and android simple remote control

---------- Post updated at 12:28 PM ---------- Previous update was at 12:26 PM ----------

second thought that is not jsch but googing produced that result. Smilie
# 4  
Old 09-21-2014
Your original initial post sounded like tui-browser might be a solution, which is no longer true.
Sorry cant help with jsch.

Regarding that raspery pi example, did you understand that you must install something on both sides, client and server?

Have a nice evening.
Login or Register to Ask a Question

Previous Thread | Next Thread

2 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Control Panel seeking.

Hi, guys. My friends and I used to rent space from our ISP, and they applied Cpanel to help us to config. Recently we just upgrade to the dedicated server plan, and there is nothing but only the os has been installed. Since Cpanel is the commercial software, we cannot afford it, we need to find a... (2 Replies)
Discussion started by: HOUSCOUS
2 Replies

2. Filesystems, Disks and Memory

OS X / fsck / apps dont work no control panel

Alright. My neighbor kid brings me his iBook and says nothing works. He decided to move the file system to his likeness and that semed to create the problems. Now he doesn't have access rights to his home. I have run fsck over and over again and I keep getting ** fs modified ** I have also... (0 Replies)
Discussion started by: maxwell
0 Replies
Login or Register to Ask a Question