Skip to content

Commit

Permalink
不用判断进程文件是否存在
Browse files Browse the repository at this point in the history
  • Loading branch information
midoks committed Apr 11, 2018
1 parent 0111035 commit 5f35552
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
27 changes: 14 additions & 13 deletions BigData/BigData/Base.lproj/MainMenu.xib
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="12120" systemVersion="16E195" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14109" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="12120"/>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14109"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
Expand Down Expand Up @@ -162,7 +163,7 @@
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
<tableColumns>
<tableColumn width="113" minWidth="40" maxWidth="1000" id="H5G-F7-w1f">
<tableColumn identifier="" width="113" minWidth="40" maxWidth="1000" id="H5G-F7-w1f">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" title="projects">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
Expand All @@ -179,7 +180,7 @@
<rect key="frame" x="1" y="1" width="113" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kU2-4Q-ujx">
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="kU2-4Q-ujx">
<rect key="frame" x="0.0" y="0.0" width="113" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="test1" id="OB0-hz-btX">
Expand All @@ -204,7 +205,7 @@
</subviews>
</clipView>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="NZn-IZ-ANH">
<rect key="frame" x="1" y="-16" width="0.0" height="16"/>
<rect key="frame" x="1" y="7" width="0.0" height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="E66-JT-35e">
Expand All @@ -227,7 +228,7 @@
<action selector="openCellDir:" target="2BL-Bd-5TL" id="6yP-gG-pM3"/>
</connections>
</pathControl>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="OcX-cr-hWD">
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="OcX-cr-hWD">
<rect key="frame" x="153" y="145" width="49" height="14"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Start.sh:" id="xfm-xS-WfD">
Expand Down Expand Up @@ -299,7 +300,7 @@
<action selector="openCellDir:" target="2BL-Bd-5TL" id="rT0-mz-YA6"/>
</connections>
</pathControl>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ych-KZ-Ved">
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Ych-KZ-Ved">
<rect key="frame" x="153" y="90" width="48" height="14"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Stop.sh:" id="LJb-rV-0EI">
Expand Down Expand Up @@ -341,7 +342,7 @@
<action selector="openCellDir:" target="2BL-Bd-5TL" id="ctm-pW-s6M"/>
</connections>
</pathControl>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oAM-kb-fou">
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="oAM-kb-fou">
<rect key="frame" x="153" y="33" width="62" height="14"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Restart.sh:" id="2Ls-Yg-qNK">
Expand Down Expand Up @@ -372,7 +373,7 @@
<action selector="selectDir:" target="2BL-Bd-5TL" id="oIk-RH-Nqu"/>
</connections>
</button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ysn-H7-qp8">
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ysn-H7-qp8">
<rect key="frame" x="310" y="174" width="45" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="restart" id="ys7-uM-pwG">
Expand All @@ -381,7 +382,7 @@
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Fb6-oU-Zsg">
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Fb6-oU-Zsg">
<rect key="frame" x="269" y="174" width="33" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="start" id="qjD-cC-8h1">
Expand All @@ -402,7 +403,7 @@
</connections>
</button>
<box verticalHuggingPriority="750" fixedFrame="YES" boxType="separator" translatesAutoresizingMaskIntoConstraints="NO" id="0lf-sL-Z5K">
<rect key="frame" x="146" y="232" width="222" height="111"/>
<rect key="frame" x="146" y="232" width="222" height="5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
</box>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="jTc-ue-T4F">
Expand All @@ -416,7 +417,7 @@
<action selector="reStart:" target="2BL-Bd-5TL" id="PvZ-xe-APf"/>
</connections>
</button>
<textField verticalHuggingPriority="750" fixedFrame="YES" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MEA-Vr-urU">
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="MEA-Vr-urU">
<rect key="frame" x="154" y="178" width="102" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" allowsUndo="NO" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" baseWritingDirection="leftToRight" bezelStyle="round" id="5rn-8Q-MBX">
Expand All @@ -428,7 +429,7 @@
<action selector="modPname:" target="2BL-Bd-5TL" id="UxL-zI-hWd"/>
</connections>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XQW-Nn-qov">
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="XQW-Nn-qov">
<rect key="frame" x="153" y="201" width="76" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="ProjectName:" id="f6P-ZY-9my">
Expand Down
2 changes: 1 addition & 1 deletion BigData/BigData/SettingVC.m
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ - (IBAction)start:(id)sender {
[startBtn setImage:[NSImage imageNamed:@"stop"]];
[self userCenter:[NSString stringWithFormat:@"启动%@服务成功!", projectName]];

} else if ([startStatus.stringValue isEqualToString:@"stop"] && [_fm fileExistsAtPath:pidPos]) {
} else if ([startStatus.stringValue isEqualToString:@"stop"] ) {

NSString *stopPathFile = [list objectForKey:@"stopPath"];
[[NSTask launchedTaskWithLaunchPath:@"/bin/sh" arguments:[NSArray arrayWithObjects:@"-c", stopPathFile, nil]] waitUntilExit];
Expand Down

0 comments on commit 5f35552

Please sign in to comment.