Initial commit for restart_service_from_remote

This commit is contained in:
Yavuz Aydın 2021-10-06 22:13:03 +02:00
parent 9f9189c144
commit 9e52f24654
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
#!/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
if ( [ -z $1 ] ); then
echo "USAGE: $0 service"
exit 3;
else
if [ pidof systemd >/dev/null ]; then
sudo systemctl restart $1
else
sudo service $1 restart
fi
fi