ShadowArch/AdminScripts/restart-service

13 lines
201 B
Plaintext
Raw Permalink Normal View History

#!/bin/bash
if [ "$1" == "" ]; then
echo Usage: $0 '[service(s)...]';
exit 1;
fi
for i in $@; do
systemctl daemon-reload
systemctl restart $i
sleep 3
systemctl status -l $i | head -n 6
done