MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

MISC: Adding Minivend to running server.



******    message to minivend-users from Pumin Wuvanich <pumin@madmacs.com>     ******

Hello.
        I manually create an catalog including all config,and cgi link.
Then, how can i add this new catalog to the running server without using
script 'bin/restart' since i don't wanna restart everthing.  I also take
a look in 'bin/makecat' as below but still have no idea how server and
pids works.   Thanks in advance for any ideas.

Pumin

        if($add_to_running) {
                my $fn = 'etc/restart';
                open(RESTART, ">>$fn") or
                                die "Couldn't write $fn to add catalog:
$!\n";
                Vend::Util::lockfile(\*RESTART, 1, 1)   or die "lock
$fn: $!\n";
                printf RESTART $newcfgline;
                Vend::Util::unlockfile(\*RESTART)               or die
"unlock $fn: $!\n";
                close RESTART;
                if($isroot) {
                        chown ($mvuid, $mvgid, $fn)
                                or warn "\nCouldn't set ownership of
$fn: $!\n";
                }
                unless ($Windows) {
                        kill 'HUP', $pid;
                        sleep 1;
                }
                $fn = 'etc/reconfig';
                open(RESTART, ">>$fn") or
                                die "Couldn't write $fn to add catalog:
$!\n";
                Vend::Util::lockfile(\*RESTART, 1, 1)   or die "lock
$fn: $!\n";
                printf RESTART $full . $Conf{cgiurl} . "\n";
                if($isroot) {
                        chown ($mvuid, $mvgid, $fn)
                                or warn "\nCouldn't set ownership of
$fn: $!\n";
                }
                Vend::Util::unlockfile(\*RESTART)               or die
"unlock $fn: $!\n";
                close RESTART;
                unless ($Windows) {
                        kill 'HUP', $pid;
                }
        }

-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: