How to launch InstaSafe Agent application with a bash command? - bash

I am using Ubuntu Linux 20.04
I am using an application named InstaSafe Agent which connects me to a VPN.
App Logo:
I want to automate this login process.
For that, I am looking for bash command to run this application from terminal.
this is how it looks when I open this application.
I have tried to find its installation path like this.
Command: whereis instasafe
output: instasafe: /etc/instasafe
Can Someone let me know how can I run this application using bash command?

If you have installed InstaSafe using default settings,
you can try this command.
This worked for me.
/usr/bin/java -jar /opt/instasafe/isaagent-1.0.jar

Related

How do I start MongoDB in a script?

I'm trying to create a script to start different things. Whenever I add the below to the script and run it, I get a message: "mongod: unrecognized service". I can use it in the terminal, but not through the script.
sudo service mongod start
I got it to start just using sudo service mongod start. The .sh file was created in Windows. Once I deleted it and created a .sh file in Linux, it ran.
Try
sudo service mongodb start
mongod/mongodb depends on Linux version

Installing Glassfish, Wildfly using homebrew on Mac OSX

Trying to install Glassfish(Java EE App. Server) and Wildfly App Server using Homebrew .
http://macappstore.org/wildfly-as/
http://macappstore.org/glassfish/
used these above mentioned tutorials .
I got the following errors while trying to run them by typing just "glassfish" & "wildfly-as" respectively.
Output(Error):
-bash: glassfish: command not found
-bash: wildfly-as: command not found
Searched about it and I think it has something to do with $PATH. I don't understand $PATH Variable . Need help.
The issue is that there are two asadmin scripts. One at $GLASSFISH_HOME/bin and one at $GLASSFISH_HOME/glassfish/bin
Here are full instructions to get your domain up
brew update
brew install glassfish
you should see message, add that line to your .bash_profile
==> Caveats
You may want to add the following to your .bash_profile:
export GLASSFISH_HOME=/usr/local/opt/glassfish/libexec
Open a new terminal then, cd $GLASSFISH_HOME/glassfish/bin
./asadmin start-domain --verbose
Browse to http://localhost:8080 for welcome page and http://localhost:4848 for admin console
I actually installed Wildfly-Application Server using homebrew but could not find a way to run it.
https://tomylab.wordpress.com/2016/07/03/how-to-install-wildfly-on-mac/
This tutorial helped me .
And for glassfish, my installation was again successful using homebrew but was not able to run it . I did figure it out when I ran the following commands.
$ cd /usr/local/opt/glassfish/libexec/bin
$ ./asadmin
asadmin> start-domain
You need to understand about the PATH variable. It is an environment variable on Unix-like operating systems, specifying a set of directories in which executable programs are located. In general, each executing process, or user session, has its own PATH setting.
So, you need to add the glassfish home path to your actual path variable.
Now, as per your problem with running the Glassfish server; try this:
export GLASSFISH_HOME=/usr/local/opt/glassfish/libexec/
export PATH=$PATH:$GLASSFISH_HOME/bin
Add it to your bash profile, if you do not want to do this everytime.

Running Docker using ConEmu

This is my ConEmu task setting
Task parameters: /dir "C:\Program Files\Docker Toolbox"
Commands: "%ProgramFiles%\Git\bin\bash.exe" --login -i -new_console:C:"C:\Program Files\Docker Toolbox\docker-quickstart-terminal.ico" "%ProgramFiles%\Docker Toolbox\start.sh"
This is the result, I can see the whale but I cannot use any docker command, I got error: bash: docker.exe: command not found
Please help, thanks
I'm using Windows 10, Docker Toolbox 1.11.1
Just add Docker's path to PATH.
I had a similar issue in Windows 7 with running the Quickstart Terminal, I was getting the same error. After making sure Docker's path was in PATH, I tried running the Quickstart Terminal as administrator and it works fine.
I couldn't find anything online about it, but running as administrator works, but non-admin always gets the error that you got.

docker-compose run doesn't work in windows

I am trying to figure out development with django and postgresql while using windows as the host OS. I followed 2 tutorials and both of them want me to run commands using docker-compose run, but it doesn't work on windows. It says:
> docker-compose.exe run web django-admin.py startproject rolesweb .
←[31mERROR←[0m: Interactive mode is not yet supported on Windows.
Please pass the -d flag when using `docker-compose run`.
Is there an alternative to this command? What should I do to be able to follow the tutorials further?
The tutorials:
https://docs.docker.com/compose/django/
https://realpython.com/blog/python/django-development-with-docker-compose-and-machine/
An alternative is to run docker-compose through a container where docker-compose is installed. That is what I initially recommended. In that context, the -d option would be supported.
docker-compose itself depends on nodejs/node-gyp which does not work well on Windows.

Run a windows xp bat script remotely from a ubuntu machine

Is it possible to run a windows xp bat script remotely from a ubuntu machine via command line?
This is possible if you have an ssh server running on the WinXP machine. It is trivial to set up such a server if you have installed Cygwin. This is well described here.
Then from an Ubuntu command line (or cron job) you run
ssh user#winxp command
Make sure your .bat has executable permissions.
I think that the technology you are after is WMI. I see that there is an ubuntu package called wmi-client, which you can sudo apt-get install and attempt to you. Some quick searches and I'm unable to find details, but maybe that will get you somewhere....
You would probably use something like remote desktop, and if you did it that way, it would work, but your question isn't very specific

Resources