Changeset 19790
- Timestamp:
- Sep 30, 2008, 11:55:44 AM (18 years ago)
- Location:
- trunk/Nebulous-Server
- Files:
-
- 2 edited
-
Changes (modified) (1 diff)
-
bin/neb-admin (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous-Server/Changes
r19641 r19790 4 4 - add so_id/name idxs to storage_object_xattr table 5 5 - rename neb-addvol -> neb-voladd 6 - add a pid file to neb-admin so only one instance can be run at a time 6 7 7 8 0.15 Thu Sep 11 13:00:59 HST 2008 -
trunk/Nebulous-Server/bin/neb-admin
r18457 r19790 3 3 # Copyright (C) 2005-2008 Joshua Hoblitt 4 4 # 5 # $Id: neb-admin,v 1. 8 2008-07-10 02:40:33jhoblitt Exp $5 # $Id: neb-admin,v 1.9 2008-09-30 21:55:44 jhoblitt Exp $ 6 6 7 7 use strict; … … 12 12 13 13 use DBI; 14 use Nebulous::Client; 14 15 use Nebulous::Server::SQL; 15 use Ne bulous::Client;16 use Net::Server::Daemonize qw( check_pid_file create_pid_file unlink_pid_file ); 16 17 use URI; 17 18 … … 47 48 # set default limit to 5 48 49 $limit ||= 5; 50 51 # check to make sure that only one instance of neb-admin is running 52 my $pidfile = '/var/tmp/neb-admin'; 53 $SIG{TERM} = sub { unlink_pid_file($pidfile); exit(); }; 54 # abort if an instance is already running 55 check_pid_file($pidfile); 56 create_pid_file($pidfile); 49 57 50 58 my $dbh = DBI->connect(
Note:
See TracChangeset
for help on using the changeset viewer.
