mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-19 20:46:41 +02:00
27 lines
365 B
Bash
Executable file
27 lines
365 B
Bash
Executable file
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
if [ -f /etc/conf.d/spamd ]; then
|
|
. /etc/conf.d/spamd
|
|
fi
|
|
pidfile="${pidfile:-/run/spamd.pid}"
|
|
|
|
if [ -f "$pidfile" ]; then
|
|
_pid="$(cat "$pidfile")"
|
|
fi
|
|
/usr/bin/sa-update && R=0 || R=$?
|
|
case "$R" in
|
|
0)
|
|
;;
|
|
1)
|
|
# "No fresh updates were available"; see sa-update(1)
|
|
exit 0
|
|
;;
|
|
*)
|
|
exit $R
|
|
esac
|
|
if [ -n "$_pid" ]; then
|
|
kill -SIGHUP "$_pid"
|
|
fi
|
|
|