File tree Expand file tree Collapse file tree 3 files changed +36
-9
lines changed Expand file tree Collapse file tree 3 files changed +36
-9
lines changed Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version =" 1.0" >
4
+ <dict >
5
+ <key >Label </key >
6
+ <string >com.alekcz.pcp </string >
7
+ <key >Program </key >
8
+ <string >/usr/bin/java </string >
9
+ <key >ProgramArguments </key >
10
+ <array >
11
+ <string >/usr/bin/java </string >
12
+ <string >-jar </string >
13
+ <string >/usr/local/bin/pcp-server.jar </string >
14
+ </array >
15
+ <key >RunAtLoad </key >
16
+ <true />
17
+ <key >KeepAlive </key >
18
+ <true />
19
+ </dict >
20
+ </plist >
Original file line number Diff line number Diff line change @@ -43,14 +43,21 @@ mv -f "$download_dir/pcp" "$PWD/pcp"
43
43
44
44
mv -f " $download_dir /pcp-server.jar" " $PWD /pcp-server.jar"
45
45
46
- mv -f " $download_dir /pcp.service" " /etc/systemd/system/pcp.service"
47
-
48
- systemctl enable pcp.service
49
-
50
- systemctl stop pcp.service
51
-
52
- systemctl start pcp.service
46
+ case " $( uname -s) " in
47
+ Linux* )
48
+ cp -f " $download_dir /pcp.service" " /etc/systemd/system/pcp.service"
49
+ systemctl enable pcp.service
50
+ systemctl start pcp.service
51
+ # systemctl stop pcp.service
52
+ ;;
53
+ Darwin* )
54
+ cp -f " $download_dir /com.alekcz.pcp.plist" ~ /Library/LaunchAgents/com.alekcz.pcp.plist
55
+ chown " $( id -un) :$( id -g) " " ~/Library/LaunchAgents/com.alekcz.pcp.plist"
56
+ launchctl load -w ~ /Library/LaunchAgents/com.alekcz.pcp.plist
57
+ # launchctl unload ~/Library/LaunchAgents/com.alekcz.pcp.plist
58
+ ;;
59
+ esac
53
60
54
61
chmod a+x " $PWD /pcp"
55
62
56
- echo " Successfully installed pcp in $install_dir ."
63
+ echo " Successfully installed pcp in $install_dir ."
Original file line number Diff line number Diff line change 54
54
(is (= {:name " Test" :num 1275 :end nil } (-> resp-index :body (json/decode true ))))
55
55
(is (= " 12345678" (:body resp-text)))
56
56
(is (thrown? Exception (client/get (str " http://localhost:" port " /not-there" ))))
57
- (local )
57
+ (println " Here " ( local ) )
58
58
(reset! scgi nil )))))
59
59
60
60
You can’t perform that action at this time.
0 commit comments