]> git.mxchange.org Git - payara-vagrant.git/commitdiff
fixed service script and incorporated to Vagrantfile
authorMike Croft <backtotheoldhouse@gmail.com>
Mon, 27 Apr 2015 20:16:06 +0000 (21:16 +0100)
committerMike Croft <backtotheoldhouse@gmail.com>
Mon, 27 Apr 2015 20:16:06 +0000 (21:16 +0100)
Vagrantfile
payara_service-4.1.151

index 200ac7f7f56e5570f0ee6e4d7b67dd23af6b0297..47ca252ea5400b7b1e9da25b89411ad33a54b888 100644 (file)
@@ -83,8 +83,13 @@ Vagrant.configure(2) do |config|
      sudo apt-get -y install openjdk-7-jdk         # Install JDK 7
      sudo apt-get -y install unzip                 # Install unzip
      wget http://bit.ly/1CGCtI9 -O temp.zip        # Download Payara
-     sudo mkdir -p /opt/payara                     # Make dir for Payara
-     sudo chown vagrant:vagrant /opt/payara        # Make sure vagrant owns dir
+     sudo mkdir -p /opt/payara/startup             # Make dirs for Payara
      unzip temp.zip -d /opt/payara                 # unzip Payara to dir
+     sudo cp /vagrant/payara_service-4.1.151 /opt/payara/startup/
+     sudo chmod +x /opt/payara/startup/payara_service-4.1.151
+     ln -s /opt/payara/startup/payara_service-4.1.151 /etc/init.d/payara
+     sudo update-rc.d payara defaults
+     sudo chown -R vagrant:vagrant /opt/payara        # Make sure vagrant owns dir
+     service payara start
    SHELL
 end
index d715254148432f7736a973c3c3dc37022d841ff2..9f527bb0d2ba3dca6bb5b8fdf8ed2528fef9e6da 100644 (file)
@@ -7,6 +7,18 @@ PAYARA_HOME=/opt/payara/payara41
 export PAYARA_HOME
 
 
+
+start() {
+       echo -n "Starting Payara: "
+       $PAYARA_HOME/bin/asadmin start-domain 
+}
+
+stop() {
+       echo -n "Stopping Payara: "
+       $PAYARA_HOME/bin/asadmin stop-domain 
+}
+
+
 case "$1" in
 start)
     start
@@ -20,14 +32,3 @@ restart)
 \*)
     echo "usage: $0 (start|stop|restart|help)"
 esac
-
-
-start() {
-       echo -n "Starting Payara: "
-       $PAYARA_HOME/bin/asadmin start-domain 
-}
-
-stop() {
-       echo -n "Stopping Payara: "
-       $PAYARA_HOME/bin/asadmin stop-domain 
-}