diff options
Diffstat (limited to '')
| -rwxr-xr-x | aataaj.lua | 70 |
1 files changed, 69 insertions, 1 deletions
| @@ -85,6 +85,74 @@ NOTE - Seems both ALSA and JACK are per user. So you need to run | |||
| 85 | 85 | ||
| 86 | 86 | ||
| 87 | 87 | ||
| 88 | local options = | ||
| 89 | { | ||
| 90 | start = | ||
| 91 | { | ||
| 92 | help = 'Command to start the scanning process, for Sys V init.', | ||
| 93 | }, | ||
| 94 | restart = {start}, | ||
| 95 | ['force-reload'] = {start}, | ||
| 96 | status = | ||
| 97 | { | ||
| 98 | help = 'Command to check the status of the scanning process, for Sys V init.', | ||
| 99 | }, | ||
| 100 | stop = | ||
| 101 | { | ||
| 102 | help = 'Command to stop the scanning process, for Sys V init.', | ||
| 103 | }, | ||
| 104 | JACK = | ||
| 105 | { | ||
| 106 | help = 'Command to start the JACK stuff, for users.', | ||
| 107 | }, | ||
| 108 | STOP = | ||
| 109 | { | ||
| 110 | help = 'Command to stop the JACK stuff, for users.', | ||
| 111 | func = function(a, args, i) | ||
| 112 | _.killEmAll{'qsynth'} | ||
| 113 | __[[#!/bin/bash | ||
| 114 | a2j_control --stop | ||
| 115 | sleep 2 | ||
| 116 | a2j_control --exit | ||
| 117 | sleep 2 | ||
| 118 | ]]:Do() | ||
| 119 | _.killEmAll{'alsa_in', 'alsa_out', 'zita-a2j', 'zita-j2a', 'aseqjoy', 'jack-plumbing'} | ||
| 120 | __[[#!/bin/bash | ||
| 121 | sleep 2 | ||
| 122 | jack_control stop | ||
| 123 | sleep 2 | ||
| 124 | jack_control exit | ||
| 125 | sleep 2 | ||
| 126 | ]]:Do() | ||
| 127 | _.killEmAll{'jmcore', 'qjackctl'} | ||
| 128 | -- Catia is python, and no easy way to kill it. | ||
| 129 | -- Also it keeps jackdbus alive, no matter how hard you kill it. | ||
| 130 | __"pkill -TERM -u $USER -f catia":Do() | ||
| 131 | __"sleep 2":Do() | ||
| 132 | _.killEmAll{'jackdbus', 'a2jmidid'} | ||
| 133 | os.exit(0) | ||
| 134 | end | ||
| 135 | }, | ||
| 136 | help = | ||
| 137 | { | ||
| 138 | help = 'Print help.', | ||
| 139 | func = function(a, args, i) | ||
| 140 | print(Help) | ||
| 141 | os.exit(0) | ||
| 142 | end | ||
| 143 | }, | ||
| 144 | ['--help'] = {help}, | ||
| 145 | } | ||
| 146 | |||
| 147 | local args = {...} | ||
| 148 | _.parseArgs(options, args) | ||
| 149 | |||
| 150 | |||
| 151 | |||
| 152 | |||
| 153 | |||
| 154 | |||
| 155 | --[=[ | ||
| 88 | local args = {...} | 156 | local args = {...} |
| 89 | if 0 ~= #args then | 157 | if 0 ~= #args then |
| 90 | -- for i,a in pairs(args) do | 158 | -- for i,a in pairs(args) do |
| @@ -135,7 +203,7 @@ else | |||
| 135 | print("Usage: aataaj.lua {help|start|stop|restart|force-reload|status|JACK|STOP}") | 203 | print("Usage: aataaj.lua {help|start|stop|restart|force-reload|status|JACK|STOP}") |
| 136 | return(1) | 204 | return(1) |
| 137 | end | 205 | end |
| 138 | 206 | ]=] | |
| 139 | 207 | ||
| 140 | 208 | ||
| 141 | 209 | ||
