|
@@ -181,6 +181,7 @@ if (-e AGENT_LOG_FILE)
|
|
|
# Fix permissions on OGP files
|
|
# Fix permissions on OGP files
|
|
|
my $screenDir = AGENT_RUN_DIR . "/../home/cyg_server/.screen";
|
|
my $screenDir = AGENT_RUN_DIR . "/../home/cyg_server/.screen";
|
|
|
check_b4_chdir($screenDir);
|
|
check_b4_chdir($screenDir);
|
|
|
|
|
+take_ownership($screenDir);
|
|
|
chmod 0700, AGENT_RUN_DIR . "/../home/cyg_server/.screen";
|
|
chmod 0700, AGENT_RUN_DIR . "/../home/cyg_server/.screen";
|
|
|
chdir AGENT_RUN_DIR;
|
|
chdir AGENT_RUN_DIR;
|
|
|
|
|
|
|
@@ -706,6 +707,12 @@ sub is_screen_running_without_decrypt
|
|
|
my $screen_id = create_screen_id($screen_type, $home_id);
|
|
my $screen_id = create_screen_id($screen_type, $home_id);
|
|
|
|
|
|
|
|
my $is_running = `screen -list | grep $screen_id`;
|
|
my $is_running = `screen -list | grep $screen_id`;
|
|
|
|
|
+
|
|
|
|
|
+ # One more check (happens if exactly one and only one screen session is running)
|
|
|
|
|
+ if ($is_running =~ /^\s*$/)
|
|
|
|
|
+ {
|
|
|
|
|
+ $is_running = `ls -A /home/cyg_server/.screen | grep $screen_id`;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
if ($is_running =~ /^\s*$/)
|
|
if ($is_running =~ /^\s*$/)
|
|
|
{
|
|
{
|