aboutsummaryrefslogtreecommitdiff
path: root/vo/votools/aladin.cl
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /vo/votools/aladin.cl
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'vo/votools/aladin.cl')
-rw-r--r--vo/votools/aladin.cl43
1 files changed, 43 insertions, 0 deletions
diff --git a/vo/votools/aladin.cl b/vo/votools/aladin.cl
new file mode 100644
index 00000000..5b4299bc
--- /dev/null
+++ b/vo/votools/aladin.cl
@@ -0,0 +1,43 @@
+#{ ALADIN -- Start or stop the ALADIN app.
+
+procedure aladin (cmd)
+
+string cmd { prompt = "Command" }
+bool bkg = yes { prompt = "Run in background?" }
+bool verbose = no { prompt = "Print actions?" }
+
+begin
+ string action, command, ch
+ bool verb
+
+
+ if ($nargs > 0)
+ action = cmd
+ else
+ action = "start"
+ verb = verbose
+ command = "!" // osfn ("vo$java/app.aladin")
+
+
+ if (action == "stop" || action == "off") {
+ if (verb)
+ printf ("Stopping Aladin .... ")
+ command = command // " -kill"
+ print (command) | cl(, >& "dev$null")
+
+
+ } else if (action == "status") {
+ command = command // " -status"
+ print (command) | cl()
+
+ } else {
+ # Default is to start the app
+ if (verb)
+ printf ("Starting Aladin .... ")
+ command = command // " -bg"
+ print (command) | cl(, >& "dev$null")
+ }
+
+ if (verb)
+ printf ("\n")
+end