Implement process listing
This commit is contained in:
parent
688c3827f7
commit
fbb725a949
17
firestarter
17
firestarter
@ -125,6 +125,19 @@ fsexec() {
|
||||
warn "Could not execute target: \"$filename\""
|
||||
fi
|
||||
}
|
||||
fslist() {
|
||||
# List all valid services and what they point to
|
||||
for file in "$_optconfigdir"/*; do
|
||||
if ! [ -e "$file" ]; then
|
||||
error "No configuration files found" 70
|
||||
fi
|
||||
# Skip our logs directory
|
||||
[ "$_optlogdir" == "$file" ] && continue
|
||||
if gettarget "$file"; then
|
||||
echo "$(basename -- "$file")"
|
||||
fi
|
||||
done
|
||||
}
|
||||
fsstatus() {
|
||||
# List statistics about firestarter
|
||||
warn "NYI"
|
||||
@ -303,6 +316,7 @@ If no command is specified, firestarter will behave as though init had been
|
||||
provided
|
||||
|
||||
init Start all services and wait
|
||||
list List all valid services
|
||||
start Start the provided service, fork, and exit
|
||||
status Show status information
|
||||
|
||||
@ -327,6 +341,9 @@ firestart() {
|
||||
step_wait
|
||||
step_logout
|
||||
;;
|
||||
list)
|
||||
fslist
|
||||
;;
|
||||
start)
|
||||
for file in "${_args[@]:1}"; do
|
||||
fsexec "$_optconfigdir"/"$file"
|
||||
|
Loading…
Reference in New Issue
Block a user