bin/diru in diru-0.1.3 vs bin/diru in diru-0.1.4
- old
+ new
@@ -72,10 +72,11 @@
[ :switch, 'hub', nil, "H: Start hub." ],
[ :opt_single, 'hport', nil, "H: Hub port (default: DIRU_HUB_PORT or 41114)." ],
[ :switch, 'hkill', nil, "H: Kill hub." ],
[ :switch, 'nodaemon', nil, "H: No daemon for server." ],
[ :switch, 'start', nil, "HS: Start hub and default server." ],
+ [ :switch, 'stop', nil, "HS: Stop hub and default server." ],
[ :opt_any, 'server', '-s', "S: Open server for user (default: $USER)." ],
[ :opt_single, 'kill', '-k', "S: Close server." ],
[ :switch, 'list', '-l', "S: List servers." ],
[ :opt_single, 'options', '-o', "SC: Options File." ],
[ :opt_single, 'port', '-p', "SC: Server port for client (default: DIRU_PORT or ~/.diru.prt)." ],
@@ -1452,10 +1453,10 @@
else
hport = Diru::DIRU_HUB_PORT
end
-if Opt['hkill'].given
+if Opt['hkill'].given || Opt['stop'].given
begin
hub = DRbObject.new( nil, "druby://localhost:#{hport}" )
hub.kill
rescue
Diru.error "Could not kill Hub!"