add autostart example for simple wms
This commit is contained in:
parent
0edf33897a
commit
6bf16e5f3e
1 changed files with 17 additions and 0 deletions
17
autostart
Executable file
17
autostart
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/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
|
||||
service=$1
|
||||
if pgrep -u $USER ${service} >/dev/null; then
|
||||
return 0
|
||||
else
|
||||
${service} &
|
||||
disown
|
||||
fi
|
||||
}
|
||||
#check_start nm-applet
|
Loading…
Reference in a new issue