vscripts/autostart

16 lines
381 B
Text
Raw Permalink Normal View History

2016-10-04 11:08:47 +03:00
#!/usr/bin/env zsh
#
# A simple autostart script so that I don't have to write it again for each of
# my installations.
function check_start
{
# check if the service is running and, if not, start it in the background
# and detach
2017-05-10 18:17:24 +03:00
if pgrep -u $USER $1 >/dev/null; then
2016-10-04 11:08:47 +03:00
return 0
else
2017-05-10 18:17:24 +03:00
$* &>/dev/null </dev/null & disown
2016-10-04 11:08:47 +03:00
fi
}
#check_start nm-applet