File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,8 @@ main() {
167167 exit
168168 fi
169169 checkargs " $@ "
170+ donesomething=false
171+ reload=false
170172 for f in " $@ " ; do
171173 if [ ! -f " $f " ]; then
172174 echo >&2 " $f not found"
@@ -181,12 +183,12 @@ main() {
181183 fi
182184 if [ " ${command} " = " disable" ]; then
183185 donesomething=true
186+ reload=true
184187 printf " #%s\n" " $cronjob " > " $f "
185- reload_crontab
186188 elif [ " ${command} " = " enable" ]; then
187189 donesomething=true
190+ reload=true
188191 printf " %s\n" " $cronjob " > " $f "
189- reload_crontab
190192 elif [ " ${command} " = " now" ] || [ " ${command} " = " now_force" ] || [ " ${command} " = " now_wait" ]; then
191193 donesomething=true
192194 lock=" $lockdir /$1 .lock"
@@ -218,6 +220,9 @@ main() {
218220 printf " %s: %s; %s\n" " $status " " $f " " $cronjob "
219221 fi
220222 done
223+ if $reload ; then
224+ reload_crontab
225+ fi
221226 if ! $donesomething ; then
222227 checkargs " $command "
223228 echo >&2 " Unknown command: $command "
You can’t perform that action at this time.
0 commit comments