#!/usr/bin/perl -w use strict; use My::Demonize; use Data::Dumper; my $command = shift @ARGV || ''; my $demon = My::Demonize->new(configfile=>'config.yml'); if ($command eq 'start') { exit $demon->start; } elsif ($command eq 'restart') { $demon->stop; exit $demon->start; } elsif ($command eq 'stop') { $demon->stop; } elsif ($command eq 'status') { $demon->status; } else { die <