summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2021-03-03 18:12:34 +0100
committerHiltjo Posthuma <hiltjo@codemadness.org>2021-03-03 18:12:34 +0100
commit317d08eee3494234e1e5f84fca0240abfdc8e2f5 (patch)
tree86ad97288c8dfb7918831d337bec973f1c08b15d
parentceefac3e911b84c8aa8d215a3f7ec651aaeb4800 (diff)
sfeed_update: return instead of exit in main() on success
This is useful so the script can be included, call main and then have additional post-main functionality.
-rwxr-xr-xsfeed_update2
1 files changed, 1 insertions, 1 deletions
diff --git a/sfeed_update b/sfeed_update
index 90e9d5c..a7e94d5 100755
--- a/sfeed_update
+++ b/sfeed_update
@@ -204,7 +204,7 @@ main() {
cleanup
# on signal SIGINT and SIGTERM exit with signal number + 128.
[ ${signo} -ne 0 ] && exit $((signo+128))
- exit 0
+ return 0
}
[ "${SFEED_UPDATE_INCLUDE}" = "1" ] || main "$@"