Search Results

Search found 2 results on 1 pages for 'user265330'.

Page 1/1 | 1 

  • Starting java processes with Upstart

    - by user265330
    I want to start a java process using Upstart. Currently, on our OpenSuSE servers, I use the System V init system to achieve this, but on our Ubuntu servers I'd rather use Upstart. But I have two questions... I have an Upstart job (a task) that configures the server, called, say, myconfig. And in the job that starts my java processes I ostensibly have: start on stopped myconfig exec /path/to/myjavastartscript.sh myjavastartscript.sh runs 'java -classpath blah MyClass'. In System V init, starting the service runs 'nohup /path/to/myjavastartscript.sh &'. So my first question is whether I still need to do the nohup or run-in-background with the exec command? When running, MyClass starts other Java processes. In System V init, the service stop just looks for java processes owned by a certain user and kills them. My second question is how could I control the termination of these processes with Upstart?

    Read the article

  • Bash script with regex not behaving on Ubuntu

    - by user265330
    I have a Bash script that is working on my OpenSuSE box, but when copied across to my Ubuntu box, is not working. The script reads in from a file. The file has fields separated by white space (tabs and spaces). #!/bin/bash function test1() { while read LINE do if [[ $LINE =~ "^$" || $LINE =~ "^#.*" ]] ; then continue; fi set -- $LINE local field1=$1 local field2=$2 done < test.file } test1 with test.file containing: # Field1Header Field2Header abcdef A-2 ghijkl B-3 There seem to be two problems: (1) $field2, the one with the hyphen, is blank (2) The regex to strip out the blank lines and lines that start with # is not working Anyone know what's wrong? As I said, it works fine on OpenSuSE. Thanks, Paul

    Read the article

1