diff options
| author | yuzu-eva <cafebabe@disroot.org> | 2025-05-08 14:01:37 +0200 |
|---|---|---|
| committer | yuzu-eva <cafebabe@disroot.org> | 2025-05-08 14:01:37 +0200 |
| commit | ef7c1605a027b52bbff1b01ea693b60f53fa3a71 (patch) | |
| tree | 1089334258aefbd459d18cf6968e78f1194739b0 /ytlocal | |
initial commit
Diffstat (limited to 'ytlocal')
| -rwxr-xr-x | ytlocal | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +PIDFILE="$HOME/.youtube-local/pid" +LOGFILE="$HOME/.youtube-local/log" + +start() { + /usr/local/bin/youtube-local >"${LOGFILE}" 2>&1 & + echo $! >"${PIDFILE}" +} + +stop() { + kill `cat "${PIDFILE}"` + rm "${PIDFILE}" +} + +case "$1" in + start) start ;; + stop) stop ;; + *) echo "usage: $0 start|stop" >&2 + exit 1 + ;; +esac |
