+ }
+ if (service!=null) {
+ File status = new File("/opt/app/aaf/status/");
+ boolean deleted = false;
+ if(status.exists()) {
+ int lastdot = service.appName.lastIndexOf("aaf.");
+ String fname;
+ if(lastdot<0) {
+ fname = service.appName + '-' + hostname;
+ } else {
+ fname = service.appName.substring(lastdot).replace('.', '-')
+ + '-' + hostname;
+ }
+ status = new File(status, fname);
+ if(status.exists()) {
+ deleted=status.delete();
+ }
+ }
+ if(deleted) {
+ service.access.log(Level.INIT, "Deleted Status",status.getAbsolutePath());
+ } else if(status.exists()) {
+ service.access.log(Level.INIT, "Status not deleted: ",status.getAbsolutePath());
+ }