dotfiles/unprocessed/termux/scripts/service
Geoffrey Frogeye ee178b7d57
nix: Make nix the root
Which means now I'll have to think about real prefixes in commit names.
2023-11-26 23:58:22 +01:00

23 lines
304 B
Bash
Executable file

#!/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