23 lines
304 B
Plaintext
23 lines
304 B
Plaintext
|
#!/data/data/com.termux/files/usr/bin/bash
|
||
|
#
|
||
|
# Run & stop Termux services
|
||
|
#
|
||
|
|
||
|
if [ $# -lt 1 ]
|
||
|
then
|
||
|
echo "Expected a service name as first argument."
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
service="$1"
|
||
|
file="$HOME/.termux/services/$1"
|
||
|
|
||
|
if [ -f "$file" ]
|
||
|
then
|
||
|
shift
|
||
|
$file "$@"
|
||
|
else
|
||
|
echo "Service not found: $1"
|
||
|
fi
|
||
|
|