• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

script runs from command line, but from webmin it creates errors

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Folks

I have a script that runs 3 other scripts. I did not write them, I just run them, the first looks like



when I log into bash I can run the script with the command
/ChengFAC/Sync/bin/syncAll.sh

But I need this command to be able to be run from the webmin interface.

I had this running fine on another server and it all worked from bash and from webmin.

When I run it from webmin I get the error

this is on a manged hosting account and when I contacted support they said


Can anyone shed any light on what this means? I dont know where to add the "PATH environment variable."

the syncAll.sh script runs another script called /AwardsTrainingsListSync.sh it looks like this

I realize this is a random question and Im not sure where to post it,

My questions are
1. Does the information given to me by my tech support sound correct?
2. If so where do I change the "PATH environment variable"

Thanks in advance!
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, and it depends.

The command is being run with the wrong version of Java. I don't know what a "webmin" is, but you'd need to figure out where it gets its PATH value from. If it's from your login account you could just change your login script.
 
michael white
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for the answer...

And what should I change in the log in script? my .profile file looks like this

Can I add this path to the scripts to set the path inside each script? I guess webmin is running the script without logging into ssh. It logs in via ftp.

Webmin is an open source server management tool, it provides a GUI so you can do much of your server administration via the GUI as opposed to command line.

In this case its really helpful because we have an online tool that syncs with a database, some of our sales staff need to run the sync on demand so instead of logging into SSH which would be quite overwhelming for a "non techie"
they just log into webmin under a specific account that only has access to one module and they run the script with a few clicks.
 
michael white
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
anyone?
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can't really "log in via FTP"; FTP is for transferring files between systems.

In any case, sure, you could add those lines to any script you wanted, if they solve the problem.
 
michael white
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks

so should I just cut and paste those lines into the top of the script?
 
author
Posts: 23912
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

michael white wrote:thanks

so should I just cut and paste those lines into the top of the script?



IMO, I think the first thing to do (after backing up the scripts), is to grep the script for the path. And if there is a reference related to java, try changing that first.

If the scripts sets the path, then adding to the top of the script will probably not work.

Henry
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic