X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=cadi%2Faaf%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fcadi%2Fconfigure%2FPlaceArtifactScripts.java;h=48f0e622041887da357f7365dada231089c331af;hb=1296352d8eafee57f982a4342ad79ada4aa56d28;hp=05ffdbfe6318ea1f0a9ee46021a8f8d7c7541bce;hpb=bdce7667a6e272e2fa32e298d957a0d9090c5bc9;p=aaf%2Fauthz.git diff --git a/cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/PlaceArtifactScripts.java b/cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/PlaceArtifactScripts.java index 05ffdbfe..48f0e622 100644 --- a/cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/PlaceArtifactScripts.java +++ b/cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/PlaceArtifactScripts.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -47,7 +47,7 @@ public class PlaceArtifactScripts extends ArtifactDir { } else { email=arti.getOsUser() + '\n'; } - + StringBuilder classpath = new StringBuilder(); boolean first = true; for (String pth : Split.split(File.pathSeparatorChar, System.getProperty("java.class.path"))) { @@ -59,13 +59,13 @@ public class PlaceArtifactScripts extends ArtifactDir { File f = new File(pth); classpath.append(f.getCanonicalPath().replaceAll("[0-9]+\\.[0-9]+\\.[0-9]+",Defaults.AAF_VERSION+".*")); } - + write(f1,Chmod.to644, "#!/bin/bash " + f1.getCanonicalPath()+'\n', "# Certificate Manager Check Script\n", "# Check on Certificate, and renew if needed.\n", "# Generated by Certificate Manager " + Chrono.timeStamp()+'\n', - "# by Deployer " + trans.getProperty(Config.AAF_APPID,"") + '\n', + "# by Deployer " + trans.getProperty(Config.AAF_APPID,"") + '\n', "#\n", "DIR="+arti.getDir()+'\n', "APP_ID=" + arti.getMechid() + '\n', @@ -80,7 +80,7 @@ public class PlaceArtifactScripts extends ArtifactDir { "fi\n", checkScript ); - + // Setup check.sh script File f2 = new File(dir,arti.getNs()+".crontab.sh"); write(f2,Chmod.to644, @@ -100,9 +100,9 @@ public class PlaceArtifactScripts extends ArtifactDir { } return true; } - + /** - * Note: java.home gets Absolute Path of Java, where we probably want soft links from + * Note: java.home gets Absolute Path of Java, where we probably want soft links from * JAVA_HOME * @return */ @@ -110,7 +110,7 @@ public class PlaceArtifactScripts extends ArtifactDir { String rc = System.getenv("JAVA_HOME"); return rc==null?System.getProperty("java.home"):rc; } - private final static String checkScript = + private final static String checkScript = "function mailit {\n" + " if [ -e /bin/mail ]; then\n" + " MAILER=/bin/mail\n" + @@ -150,8 +150,8 @@ public class PlaceArtifactScripts extends ArtifactDir { " ;;\n" + " esac\n\n" + " # Note: make sure to cover this sripts' exit Code\n"; - - private final static String cronScript = + + private final static String cronScript = "crontab -l | sed -n \"/#### BEGIN $CF/,/END $CF ####/!p\" > $TFILE\n" + "# Note: Randomize Minutes (0-60) and hours (1-4)\n" + "echo \"#### BEGIN $CF ####\" >> $TFILE\n" +