File tree Expand file tree Collapse file tree
package/Linux/gateway/rpm Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -141,8 +141,18 @@ check_unit_file() {
141141}
142142
143143check_single_execstart () {
144- local count
145- count=$( grep -h ' ^ExecStart=' " ${UNIT_FILE_PATHS[@]} " 2> /dev/null | wc -l)
144+ local unit_file=" " count
145+ for path in " ${UNIT_FILE_PATHS[@]} " ; do
146+ if [ -f " $path " ]; then
147+ unit_file=" $path "
148+ break
149+ fi
150+ done
151+ if [ -z " $unit_file " ]; then
152+ return # check_unit_file already reported the absence
153+ fi
154+ # Match only non-empty ExecStart= lines; bare 'ExecStart=' is a reset directive.
155+ count=$( grep -c ' ^ExecStart=[^[:space:]]' " $unit_file " 2> /dev/null || echo 0)
146156 if [ " $count " -eq 1 ]; then
147157 pass " Service file has exactly one ExecStart directive"
148158 else
Original file line number Diff line number Diff line change 44
55action=" $1 "
66
7+ if [ -d /run/systemd/system ]; then
8+ systemctl daemon-reload
9+ fi
10+
711# Only do complete clean-up on purge.
812if [ " $action " != " purge" ] ; then
913 exit 0
Original file line number Diff line number Diff line change 1616if [ -d /run/systemd/system ]; then
1717 systemctl stop devolutions-gateway > /dev/null 2>&1
1818 systemctl disable devolutions-gateway > /dev/null 2>&1
19- systemctl daemon-reload
2019fi
You can’t perform that action at this time.
0 commit comments