/etc/init.d/monit: 39: [: reload: unexpected operator
Bug #993381 reported by
Mike Conigliaro
This bug affects 4 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
monit (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
# /etc/init.d/monit restart
/etc/init.d/monit: 39: [: restart: unexpected operator
/etc/init.d/monit: 39: [: stop: unexpected operator
* Stopping daemon monitor monit [ OK ]
/etc/init.d/monit: 39: [: start: unexpected operator
* Starting daemon monitor monit
More info here: http://
Changed in monit (Ubuntu): | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
This is due to a bashism on line 39 of the init.d script.
...
if [ "$1" == "start" ]
...
The '==' is a bashism and not posix compliant. It should be 1 '='.
The fix is to just delete one of those equal signs. I'd submit a patch but it is to trivial to be worth the effort.