Ubic

 view release on metacpan or  search on metacpan

lib/Ubic/Manual/FAQ.pod  view on Meta::CPAN

Ubic::Manual::FAQ - frequently asked questions about Ubic

=head1 VERSION

version 1.60

=head1 QUESTIONS

=head2 I changed my service's user, and now it fails with "Permission denied" error. Please help!

You have to chown your service files manually. Try this:

    find /var/lib/ubic -name '*MY_SERVICE_NAME*' | xargs chown -R MY_NEW_USER

In the future, this one-liner will be reimplemented as "ubic fix-permissions" command. Sorry for the inconvenience.

=head2 Can I use ubic with perlbrew? How?

Yes you can, but you have to be careful.

Perlbrew depends on environment variables, so you have to make sure that they are configured correctly in all cases when you call ubic. This especially includes the crontab entry which ubic installs for you. You'll probably have to edit it manually, ...

  * * * * * . /home/your_login/perl5/perlbrew/etc/bashrc && ubic-watchdog ubic.watchdog    >>/dev/null 2>>/dev/null

root_t/groups.t  view on Meta::CPAN

    is($line, "abc\n");
}

sub prepare_file($$$$) {
    my ($daemon, $user, $group, $chmod) = @_;
    my $file = "tfiles/$daemon.result";
    my $gid = getgrnam $group;
    my $uid = getpwnam $user;
    open my $fh, ">>", $file or die "open failed: $!";
    close $fh or die "close failed: $!";
    chown $uid, $gid, $file or die "chown failed: $!";
    chmod $chmod, $file or die "chmod failed: $!";
}

sub execute_daemon($) {
    my $name = shift;

    Ubic->start($name);
    sleep 0.1;
    Ubic->stop($name);
}



( run in 0.631 second using v1.01-cache-2.11-cpan-5511b514fd6 )