dotfiles/termux/scripts/service

23 lines
304 B
Plaintext
Raw Normal View History

2017-09-17 13:36:17 +02:00
#!/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