mirror of
https://github.com/YunoHost-Apps/lstu_ynh.git
synced 2024-09-03 19:36:12 +02:00
keep CHECK_VAR... For now
This commit is contained in:
parent
30e7c9878c
commit
f53406b066
1 changed files with 7 additions and 0 deletions
|
@ -1,5 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
CHECK_VAR () { # Verifies that the variable is not empty.
|
||||
# $1 = Variable to be checked
|
||||
# $2 = Display text on error
|
||||
test -n "$1" || (echo "$2" >&2 && false)
|
||||
}
|
||||
|
||||
|
||||
# Start (or other actions) a service, print a log in case of failure and optionnaly wait until the service is completely started
|
||||
#
|
||||
# usage: ynh_systemd_action [-n service_name] [-a action] [ [-l "line to match"] [-p log_path] [-t timeout] [-e length] ]
|
||||
|
|
Loading…
Reference in a new issue