Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- root@swaggserver-01:/home/daniel# ./bin/snip.pl
- not reachable!!
- restart zebra ospfd ospf6d... Failed to restart zebra\x20ospfd\x20ospf6d.service: Unit not found.
- Done!!
- waiting 9 seconds to cont... root@swaggserver-01:/home/daniel#
- root@swaggserver-01:/home/daniel# cat bin/snip.pl
- #!/usr/bin/env perl
- use strict;
- use warnings;
- my $svmgr = "systemctl";
- my $svact = "restart";
- my @svcs = ("zebra", "ospfd", "ospf6d");
- my $sleepy = 9;
- sub rest_svc {
- print "not reachable!!\n$svact @svcs... ";
- system("$svmgr", "$svact", "@svcs");
- print "Done!!\nwaiting $sleepy seconds to cont... ";
- sleep ($sleepy);
- }
- rest_svc();root@swaggserver-01:/home/daniel#
- root@swaggserver-01:/home/daniel#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement