s for service name

This commit is contained in:
Chang, Chu-Kuan 2021-06-11 22:11:42 +08:00
parent d49338f7df
commit 7181224de4
1 changed files with 3 additions and 3 deletions

View File

@ -370,16 +370,16 @@ doas -u _dkimsign openssl genrsa -out "${dkimkey}" 2048
# Restart daemons # Restart daemons
# #
for x in 'smtpd' 'dovecot' 'rspamd' 'redis'; do for s in 'smtpd' 'dovecot' 'rspamd' 'redis'; do
printf '%s: Enabling %s...' "${progname}" "$x" printf '%s: Enabling %s...' "${progname}" "$x"
if rcctl enable "$x" 2>&1 > /dev/null; then if rcctl enable "$s" 2>&1 > /dev/null; then
printf ' Done\n' printf ' Done\n'
else else
printf ' Failed\n' printf ' Failed\n'
fi fi
printf '%s: Restarting %s...' "${progname}" "$x" printf '%s: Restarting %s...' "${progname}" "$x"
if rcctl restart "$x" 2>&1 > /dev/null; then if rcctl restart "$s" 2>&1 > /dev/null; then
printf ' Done\n' printf ' Done\n'
else else
printf ' Failed\n' printf ' Failed\n'