Phase 2: Rename critical files (ogp_api.php to gsp_api.php, logos, agent files)

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-09-08 15:49:50 +00:00
parent 7f19731158
commit 4b771d498f
54 changed files with 102 additions and 102 deletions

View file

@ -37,7 +37,7 @@ function addToLog($errors) {
$createLog = fopen($logFile, 'a+');
if (!$createLog) {
trigger_error("Unable to create EHCP FTP Integration log file! Please create a file named \"ehcp_ftp_log.txt\" in the ogp_agent install directory under the EHCP folder with permissions of 777", E_USER_NOTICE);
trigger_error("Unable to create EHCP FTP Integration log file! Please create a file named \"ehcp_ftp_log.txt\" in the gsp_agent install directory under the EHCP folder with permissions of 777", E_USER_NOTICE);
}
fclose($createLog);
}

View file

@ -66,7 +66,7 @@ use constant SCREEN_LOG_LOCAL => $Cfg::Preferences{screen_log_local};
use constant DELETE_LOGS_AFTER => $Cfg::Preferences{delete_logs_after};
use constant LINUX_USER_PER_GAME_SERVER => $Cfg::Preferences{linux_user_per_game_server};
use constant AGENT_PID_FILE =>
Path::Class::File->new(AGENT_RUN_DIR, 'ogp_agent.pid');
Path::Class::File->new(AGENT_RUN_DIR, 'gsp_agent.pid');
use constant AGENT_RSYNC_GENERIC_LOG =>
Path::Class::File->new(AGENT_RUN_DIR, 'rsync_update_generic.log');
use constant STEAM_LICENSE_OK => "Accept";
@ -864,7 +864,7 @@ sub universal_start_without_decrypt
}
}
# Fix perms on ogp_agent user's homedir so that other users can access their owned files within this dir
# Fix perms on gsp_agent user's homedir so that other users can access their owned files within this dir
my $fixOGPHomeDirCommand = 'chmod -R ug+rwx $( getent passwd "' . $ogpAgentGroup . '" | cut -d: -f6 )';
sudo_exec_without_decrypt($fixOGPHomeDirCommand);
@ -3800,19 +3800,19 @@ sub agent_restart
if ($dec_check eq 'restart')
{
chdir AGENT_RUN_DIR;
if(-e "ogp_agent_run.pid")
if(-e "gsp_agent_run.pid")
{
my $init_pid = `cat ogp_agent_run.pid`;
my $init_pid = `cat gsp_agent_run.pid`;
chomp($init_pid);
if(kill 0, $init_pid)
{
my $or_exist = "";
my $rm_pid_file = "";
if(-e "ogp_agent.pid")
if(-e "gsp_agent.pid")
{
$rm_pid_file = " ogp_agent.pid";
my $agent_pid = `cat ogp_agent.pid`;
$rm_pid_file = " gsp_agent.pid";
my $agent_pid = `cat gsp_agent.pid`;
chomp($agent_pid);
if( kill 0, $agent_pid )
{
@ -3824,10 +3824,10 @@ sub agent_restart
my $restart = "echo -n \"Stopping OGP Agent...\"\n".
"kill $init_pid\n".
"while [ -e /proc/$init_pid $or_exist ];do echo -n .;sleep 1;done\n".
"rm -f ogp_agent_run.pid $rm_pid_file\necho \" [OK]\"\n".
"rm -f gsp_agent_run.pid $rm_pid_file\necho \" [OK]\"\n".
"echo -n \"Starting OGP Agent...\"\n".
"screen -d -m -t \"ogp_agent\" -c \"" . SCREENRC_FILE . "\" -S ogp_agent bash ogp_agent_run -pidfile ogp_agent_run.pid\n".
"while [ ! -e ogp_agent_run.pid -o ! -e ogp_agent.pid ];do echo -n .;sleep 1;done\n".
"screen -d -m -t \"gsp_agent\" -c \"" . SCREENRC_FILE . "\" -S gsp_agent bash gsp_agent_run -pidfile gsp_agent_run.pid\n".
"while [ ! -e gsp_agent_run.pid -o ! -e gsp_agent.pid ];do echo -n .;sleep 1;done\n".
"echo \" [OK]\"\n".
"rm -f tmp_restart.sh\n".
"exit 0\n";
@ -4648,7 +4648,7 @@ sub generate_post_install_scripts
' fi'."\n".
' fi'."\n".
' if [ ! -d "${mods_info_path}" ];then mkdir -p "${mods_info_path}";fi'."\n".
' echo "${mod_name[$i]}" > "${mods_info_path}${mod_string[$i]}.ogpmod"'."\n".
' echo "${mod_name[$i]}" > "${mods_info_path}${mod_string[$i]}.gspmod"'."\n".
' i=$(expr $i + 1)'."\n".
'done'."\n";
return "$post_install_scripts";
@ -4666,7 +4666,7 @@ sub get_workshop_mods_info()
my @mods_info;
while(my $mod_info_file = readdir(MODS_INFO_DIR))
{
if($mod_info_file =~ /\.ogpmod$/)
if($mod_info_file =~ /\.gspmod$/)
{
my $mod_info_file_path = Path::Class::File->new($mods_info_dir_path, $mod_info_file);
if(open(my $fh, '<:encoding(UTF-8)', $mod_info_file_path))

View file

@ -121,7 +121,7 @@ detectSystemD(){
echo -e "Updating OGP agent systemd service init script."
echo -e "Copying ogp_agent systemd service file to $SystemDDir"
echo "$sudoPass" | sudo -S -p "" cp "${AGENTDIR}/systemd/ogp_agent.service" "$SystemDDir"
echo "$sudoPass" | sudo -S -p "" sed -i "s#{OGP_AGENT_PATH}#$AGENTDIR#g" "${SystemDDir}/ogp_agent.service"
echo "$sudoPass" | sudo -S -p "" sed -i "s#{GSP_AGENT_PATH}#$AGENTDIR#g" "${SystemDDir}/ogp_agent.service"
echo "$sudoPass" | sudo -S -p "" systemctl daemon-reload
echo "$sudoPass" | sudo -S -p "" systemctl enable ogp_agent.service
echo "$sudoPass" | sudo -S -p "" service ogp_agent restart

View file

@ -2,7 +2,7 @@
# Generic Init script if we can't find what kind of Linux we're on
agent_dir=OGP_AGENT_DIR
agent_dir=GSP_AGENT_DIR
agent_user=OGP_USER
# Start function.

View file

@ -13,7 +13,7 @@
### END INIT INFO
#
agent_dir=OGP_AGENT_DIR
agent_dir=GSP_AGENT_DIR
agent_user=OGP_USER
#

View file

@ -4,7 +4,7 @@
# GF: Config is in $agent_dir/Cfg/Config.pm
agent_dir=OGP_AGENT_DIR
agent_dir=GSP_AGENT_DIR
agent_user=OGP_USER
depend() {

View file

@ -8,7 +8,7 @@
# chkconfig: 2345 88 10
# description: Startup/shutdown script for the Game Server Agent
agent_dir=OGP_AGENT_DIR
agent_dir=GSP_AGENT_DIR
agent_user=OGP_USER
service=agent

View file

@ -77,7 +77,7 @@ copySystemDInit(){
if [ ! -e "$SystemDDir/ogp_agent.service" ]; then
echo -e "Copying ogp_agent systemd service file to $SystemDDir"
echo "$sudoPass" | sudo -S -p "" cp "${AGENTDIR}/systemd/ogp_agent.service" "$SystemDDir"
echo "$sudoPass" | sudo -S -p "" sed -i "s#{OGP_AGENT_PATH}#$AGENTDIR#g" "${SystemDDir}/ogp_agent.service"
echo "$sudoPass" | sudo -S -p "" sed -i "s#{GSP_AGENT_PATH}#$AGENTDIR#g" "${SystemDDir}/ogp_agent.service"
fi
fi
fi
@ -292,8 +292,8 @@ fi
init_file=${init_dir}/ogp_agent
cp -f $init_file_template $init_file || failed "Failed to create init file ($init_file)."
# Next we replace the OGP_AGENT_DIR with the actual dir in init file.
sed -i "s|OGP_AGENT_DIR|${agent_home}|" ${init_file} || failed "Failed to modify init file ($init_file)."
# Next we replace the GSP_AGENT_DIR with the actual dir in init file.
sed -i "s|GSP_AGENT_DIR|${agent_home}|" ${init_file} || failed "Failed to modify init file ($init_file)."
sed -i "s|OGP_USER|${username}|" ${init_file} || failed "Failed to modify init file ($init_file)."
chmod a+x $init_file

View file

@ -6,10 +6,10 @@ After=network.target
[Service]
Type=oneshot
ExecStart=/bin/sh -c "{OGP_AGENT_PATH}/agent_init start"
ExecStop=/bin/sh -c "{OGP_AGENT_PATH}/agent_init stop"
ExecStart=/bin/sh -c "{GSP_AGENT_PATH}/agent_init start"
ExecStop=/bin/sh -c "{GSP_AGENT_PATH}/agent_init stop"
RemainAfterExit=yes
PIDFile="{OGP_AGENT_PATH}/agent_run.pid"
PIDFile="{GSP_AGENT_PATH}/agent_run.pid"
[Install]
WantedBy=multi-user.target

View file

@ -37,7 +37,7 @@ function addToLog($errors) {
$createLog = fopen($logFile, 'a+');
if (!$createLog) {
trigger_error("Unable to create EHCP FTP Integration log file! Please create a file named \"ehcp_ftp_log.txt\" in the ogp_agent install directory under the EHCP folder with permissions of 777", E_USER_NOTICE);
trigger_error("Unable to create EHCP FTP Integration log file! Please create a file named \"ehcp_ftp_log.txt\" in the gsp_agent install directory under the EHCP folder with permissions of 777", E_USER_NOTICE);
}
fclose($createLog);
}

View file

@ -62,7 +62,7 @@ use constant AGENT_VERSION => $Cfg::Config{version};
use constant SCREEN_LOG_LOCAL => $Cfg::Preferences{screen_log_local};
use constant DELETE_LOGS_AFTER => $Cfg::Preferences{delete_logs_after};
use constant AGENT_PID_FILE =>
Path::Class::File->new(AGENT_RUN_DIR, 'ogp_agent.pid');
Path::Class::File->new(AGENT_RUN_DIR, 'gsp_agent.pid');
use constant AGENT_RSYNC_GENERIC_LOG =>
Path::Class::File->new(AGENT_RUN_DIR, 'rsync_update_generic.log');
use constant STEAM_LICENSE_OK => "Accept";
@ -3367,9 +3367,9 @@ sub agent_restart
if ($dec_check eq 'restart')
{
chdir AGENT_RUN_DIR;
if(-e "ogp_agent_run.pid")
if(-e "gsp_agent_run.pid")
{
my $init_pid = `cat ogp_agent_run.pid`;
my $init_pid = `cat gsp_agent_run.pid`;
chomp($init_pid);
if(kill 0, $init_pid)
@ -3378,7 +3378,7 @@ sub agent_restart
my $rm_pid_file = "";
my $agent_pid = "";
my $restart_scr_log = Path::Class::File->new(SCREEN_LOGS_DIR, 'screenlog.agent_restart');
my $agent_scr_log = Path::Class::File->new(SCREEN_LOGS_DIR, 'screenlog.ogp_agent');
my $agent_scr_log = Path::Class::File->new(SCREEN_LOGS_DIR, 'screenlog.gsp_agent');
if(-e $restart_scr_log)
{
@ -3390,10 +3390,10 @@ sub agent_restart
unlink $agent_scr_log;
}
if(-e "ogp_agent.pid")
if(-e "gsp_agent.pid")
{
$rm_pid_file .= " ogp_agent.pid";
$agent_pid = `cat ogp_agent.pid`;
$rm_pid_file .= " gsp_agent.pid";
$agent_pid = `cat gsp_agent.pid`;
chomp($agent_pid);
if( kill 0, $agent_pid )
{
@ -3419,8 +3419,8 @@ sub agent_restart
"while [ -e /proc/$init_pid $or_exist ];do echo -n .;sleep 1;done\n".
"rm -f $rm_pid_file\necho \" [OK]\"\n".
"echo -n \"Starting OGP Agent...\"\n".
"screen -d -m -t \"ogp_agent\" -c \"" . SCREENRC_FILE . "\" -S ogp_agent bash ogp_agent -pidfile /OGP/ogp_agent_run.pid\n".
"while [ ! -e 'ogp_agent.pid' ];do echo -n .;sleep 1;done\n".
"screen -d -m -t \"gsp_agent\" -c \"" . SCREENRC_FILE . "\" -S gsp_agent bash gsp_agent -pidfile /OGP/gsp_agent_run.pid\n".
"while [ ! -e 'gsp_agent.pid' ];do echo -n .;sleep 1;done\n".
"echo \" [OK]\"\n".
"rm -f tmp_restart.sh\n".
"exit 0\n";
@ -4219,7 +4219,7 @@ sub generate_post_install_scripts
' fi'."\n".
' fi'."\n".
' if [ ! -d "${mods_info_path}" ];then mkdir -p "${mods_info_path}";fi'."\n".
' echo "${mod_name[$i]}" > "${mods_info_path}${mod_string[$i]}.ogpmod"'."\n".
' echo "${mod_name[$i]}" > "${mods_info_path}${mod_string[$i]}.gspmod"'."\n".
' i=$(expr $i + 1)'."\n".
'done'."\n";
return "$post_install_scripts";
@ -4237,7 +4237,7 @@ sub get_workshop_mods_info()
my @mods_info;
while(my $mod_info_file = readdir(MODS_INFO_DIR))
{
if($mod_info_file =~ /\.ogpmod$/)
if($mod_info_file =~ /\.gspmod$/)
{
my $mod_info_file_path = Path::Class::File->new($mods_info_dir_path, $mod_info_file);
if(open(my $fh, '<:encoding(UTF-8)', $mod_info_file_path))

View file

@ -1,59 +1,59 @@
<?php
/*
______________ Token Management
ogp_api.php?token/create/{panel_user}/{panel_password}
ogp_api.php?token/test/{token}
gsp_api.php?token/create/{panel_user}/{panel_password}
gsp_api.php?token/test/{token}
______________ Remote Servers
ogp_api.php?server/list (POST/GET {token})
ogp_api.php?server/status (POST/GET {token}{remote_server_id})
ogp_api.php?server/restart (POST/GET {token}{remote_server_id})
ogp_api.php?server/create (POST/GET {token}{agent_name}{agent_ip}{agent_port}{agent_user}{encryption_key}{ftp_ip}{ftp_port}{timeout}{use_nat}{display_public_ip})
ogp_api.php?server/remove (POST/GET {token}{remote_server_id})
ogp_api.php?server/add_ip (POST/GET {token}{remote_server_id}{ip})
ogp_api.php?server/remove_ip (POST/GET {token}{remote_server_id}{ip})
ogp_api.php?server/list_ips (POST/GET {token}{remote_server_id})
ogp_api.php?server/edit_ip (POST/GET {token}{remote_server_id}{old_ip}{new_ip})
gsp_api.php?server/list (POST/GET {token})
gsp_api.php?server/status (POST/GET {token}{remote_server_id})
gsp_api.php?server/restart (POST/GET {token}{remote_server_id})
gsp_api.php?server/create (POST/GET {token}{agent_name}{agent_ip}{agent_port}{agent_user}{encryption_key}{ftp_ip}{ftp_port}{timeout}{use_nat}{display_public_ip})
gsp_api.php?server/remove (POST/GET {token}{remote_server_id})
gsp_api.php?server/add_ip (POST/GET {token}{remote_server_id}{ip})
gsp_api.php?server/remove_ip (POST/GET {token}{remote_server_id}{ip})
gsp_api.php?server/list_ips (POST/GET {token}{remote_server_id})
gsp_api.php?server/edit_ip (POST/GET {token}{remote_server_id}{old_ip}{new_ip})
______________ Game Servers
ogp_api.php?user_games/list_games (POST/GET {token}{system(windows|linux)}{architecture(32|64)})
ogp_api.php?user_games/list_servers (POST/GET {token})
ogp_api.php?user_games/create (POST/GET {token}{remote_server_id}{server_name}{home_cfg_id}{mod_cfg_id}{ip}{port}{control_password}{enable_ftp}{ftp_password}{slots}{affinity}{nice}{assign_to_username}{custom_user_login_homepath}) // {custom_user_login_homepath} is only used when a default_game_server_home_path_prefix setting is defined and used
ogp_api.php?user_games/clone (POST/GET {token}{origin_home_id}{new_server_name}{new_ip}{new_port}{control_password}{enable_ftp}{ftp_password}{slots}{affinity}{nice}{assign_to_username}{custom_user_login_homepath}) // {custom_user_login_homepath} is only used when a default_game_server_home_path_prefix setting is defined and used
ogp_api.php?user_games/set_expiration (POST/GET {token}{home_id}{timestamp})
gsp_api.php?user_games/list_games (POST/GET {token}{system(windows|linux)}{architecture(32|64)})
gsp_api.php?user_games/list_servers (POST/GET {token})
gsp_api.php?user_games/create (POST/GET {token}{remote_server_id}{server_name}{home_cfg_id}{mod_cfg_id}{ip}{port}{control_password}{enable_ftp}{ftp_password}{slots}{affinity}{nice}{assign_to_username}{custom_user_login_homepath}) // {custom_user_login_homepath} is only used when a default_game_server_home_path_prefix setting is defined and used
gsp_api.php?user_games/clone (POST/GET {token}{origin_home_id}{new_server_name}{new_ip}{new_port}{control_password}{enable_ftp}{ftp_password}{slots}{affinity}{nice}{assign_to_username}{custom_user_login_homepath}) // {custom_user_login_homepath} is only used when a default_game_server_home_path_prefix setting is defined and used
gsp_api.php?user_games/set_expiration (POST/GET {token}{home_id}{timestamp})
______________ Users
ogp_api.php?user_admin/list (POST/GET {token})
ogp_api.php?user_admin/get (POST/GET {token}{email})
ogp_api.php?user_admin/create (POST/GET {token}{email}{name}{password})
ogp_api.php?user_admin/remove (POST/GET {token}{email})
ogp_api.php?user_admin/set_expiration (POST/GET {token}{email}{timestamp})
ogp_api.php?user_admin/list_assigned (POST/GET {token}{email})
ogp_api.php?user_admin/assign (POST/GET {token}{email}{home_id}{timestamp})
ogp_api.php?user_admin/remove_assign (POST/GET {token}{email}{home_id})
gsp_api.php?user_admin/list (POST/GET {token})
gsp_api.php?user_admin/get (POST/GET {token}{email})
gsp_api.php?user_admin/create (POST/GET {token}{email}{name}{password})
gsp_api.php?user_admin/remove (POST/GET {token}{email})
gsp_api.php?user_admin/set_expiration (POST/GET {token}{email}{timestamp})
gsp_api.php?user_admin/list_assigned (POST/GET {token}{email})
gsp_api.php?user_admin/assign (POST/GET {token}{email}{home_id}{timestamp})
gsp_api.php?user_admin/remove_assign (POST/GET {token}{email}{home_id})
______________ Game Manager
ogp_api.php?gamemanager/start (POST/GET {token}{ip}{port}{mod_key})
ogp_api.php?gamemanager/stop (POST/GET {token}{ip}{port}{mod_key})
ogp_api.php?gamemanager/restart (POST/GET {token}{ip}{port}{mod_key})
ogp_api.php?gamemanager/rcon (POST/GET {token}{ip}{port}{mod_key}{command})
ogp_api.php?gamemanager/update (POST/GET {token}{ip}{port}{mod_key}{type}{manual_url})
gsp_api.php?gamemanager/start (POST/GET {token}{ip}{port}{mod_key})
gsp_api.php?gamemanager/stop (POST/GET {token}{ip}{port}{mod_key})
gsp_api.php?gamemanager/restart (POST/GET {token}{ip}{port}{mod_key})
gsp_api.php?gamemanager/rcon (POST/GET {token}{ip}{port}{mod_key}{command})
gsp_api.php?gamemanager/update (POST/GET {token}{ip}{port}{mod_key}{type}{manual_url})
______________ Lite File Manager
ogp_api.php?litefm/list (POST/GET {token}{ip}{port}{relative_path})
ogp_api.php?litefm/get (POST/GET {token}{ip}{port}{relative_path})
ogp_api.php?litefm/save (POST/GET {token}{ip}{port}{relative_path}{contents})
ogp_api.php?litefm/remove (POST/GET {token}{ip}{port}{relative_path})
gsp_api.php?litefm/list (POST/GET {token}{ip}{port}{relative_path})
gsp_api.php?litefm/get (POST/GET {token}{ip}{port}{relative_path})
gsp_api.php?litefm/save (POST/GET {token}{ip}{port}{relative_path}{contents})
gsp_api.php?litefm/remove (POST/GET {token}{ip}{port}{relative_path})
______________ Addons Manager
ogp_api.php?addonsmanager/list (POST/GET {token})
ogp_api.php?addonsmanager/install (POST/GET {token}{ip}{port}{mod_key}{addon_id})
gsp_api.php?addonsmanager/list (POST/GET {token})
gsp_api.php?addonsmanager/install (POST/GET {token}{ip}{port}{mod_key}{addon_id})
______________ Steam Workshop
ogp_api.php?steam_workshop/install (POST/GET {token}{ip}{port}{mods_list})
gsp_api.php?steam_workshop/install (POST/GET {token}{ip}{port}{mods_list})
*
______________ Panel Setting
ogp_api.php?setting/get (POST/GET {token}{setting_name})
gsp_api.php?setting/get (POST/GET {token}{setting_name})
*/
$main_request = key($_GET);

View file

@ -58,20 +58,20 @@ function showAPILinks(elem){
if(apiToken && ipAddr && port && modKey && panelURL){
var actions = new Array(
{url: 'ogp_api.php?gamemanager/start', lang: 'start_server'},
{url: 'ogp_api.php?gamemanager/stop', lang: 'stop_server'},
{url: 'ogp_api.php?gamemanager/restart', lang: 'restart_server'}
{url: 'gsp_api.php?gamemanager/start', lang: 'start_server'},
{url: 'gsp_api.php?gamemanager/stop', lang: 'stop_server'},
{url: 'gsp_api.php?gamemanager/restart', lang: 'restart_server'}
);
var hasRcon = elem.attr('hasrcon');
if(hasRcon && hasRcon === 'true'){
actions.push({url: 'ogp_api.php?gamemanager/rcon', lang: 'rcon_command_title', additional: '&command={YOUR_RCON_COMMAND}'});
actions.push({url: 'gsp_api.php?gamemanager/rcon', lang: 'rcon_command_title', additional: '&command={YOUR_RCON_COMMAND}'});
}
var isSteam = elem.attr('hassteam');
if(isSteam && isSteam === 'true'){
actions.push({url: 'ogp_api.php?gamemanager/update', lang: 'get_steam_autoupdate_api_link', additional: '&type=steam', selected: true});
actions.push({url: 'gsp_api.php?gamemanager/update', lang: 'get_steam_autoupdate_api_link', additional: '&type=steam', selected: true});
}
var selectListHTML = '<select class="ogpAPIActions">';

View file

@ -214,7 +214,7 @@ function saveGameServerOrder(){
// Make the call
$.ajax({
type: "POST",
url: "ogp_api.php?gamemanager_admin/reorder&token=" + userAPIKey,
url: "gsp_api.php?gamemanager_admin/reorder&token=" + userAPIKey,
data: JSON.stringify(postData),
success: function(e){
logToConsole("Game server order successfully saved!");

View file

@ -60,16 +60,16 @@ function exec_ogp_module()
switch ($_POST['action']) {
case "stop":
$command = "wget -qO- \"${panelURL}/ogp_api.php?gamemanager/stop&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
$command = "wget -qO- \"${panelURL}/gsp_api.php?gamemanager/stop&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
break;
case "start":
$command = "wget -qO- \"${panelURL}/ogp_api.php?gamemanager/start&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
$command = "wget -qO- \"${panelURL}/gsp_api.php?gamemanager/start&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
break;
case "restart":
$command = "wget -qO- \"${panelURL}/ogp_api.php?gamemanager/restart&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
$command = "wget -qO- \"${panelURL}/gsp_api.php?gamemanager/restart&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
break;
case "steam_auto_update":
$command = "wget -qO- \"${panelURL}/ogp_api.php?gamemanager/update&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}&type=steam\" --no-check-certificate > /dev/null 2>&1";
$command = "wget -qO- \"${panelURL}/gsp_api.php?gamemanager/update&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}&type=steam\" --no-check-certificate > /dev/null 2>&1";
break;
}

View file

@ -231,16 +231,16 @@ function updateCronJobsToNewApi()
switch ($action) {
case "stopServer":
$command = "wget -qO- \"${panelURL}/ogp_api.php?gamemanager/stop&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
$command = "wget -qO- \"${panelURL}/gsp_api.php?gamemanager/stop&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
break;
case "startServer":
$command = "wget -qO- \"${panelURL}/ogp_api.php?gamemanager/start&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
$command = "wget -qO- \"${panelURL}/gsp_api.php?gamemanager/start&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
break;
case "restartServer":
$command = "wget -qO- \"${panelURL}/ogp_api.php?gamemanager/restart&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
$command = "wget -qO- \"${panelURL}/gsp_api.php?gamemanager/restart&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
break;
case "autoUpdateSteamHome":
$command = "wget -qO- \"${panelURL}/ogp_api.php?gamemanager/update&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}&type=steam\" --no-check-certificate > /dev/null 2>&1";
$command = "wget -qO- \"${panelURL}/gsp_api.php?gamemanager/update&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}&type=steam\" --no-check-certificate > /dev/null 2>&1";
break;
}
list($minute,$hour,$dayOfTheMonth,$month,$dayOfTheWeek,$old_command) = explode(" ", $job, 6);

View file

@ -61,16 +61,16 @@ function exec_ogp_module()
switch ($_POST['action']) {
case "stop":
$command = "wget -qO- \"${panelURL}/ogp_api.php?gamemanager/stop&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
$command = "wget -qO- \"${panelURL}/gsp_api.php?gamemanager/stop&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
break;
case "start":
$command = "wget -qO- \"${panelURL}/ogp_api.php?gamemanager/start&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
$command = "wget -qO- \"${panelURL}/gsp_api.php?gamemanager/start&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
break;
case "restart":
$command = "wget -qO- \"${panelURL}/ogp_api.php?gamemanager/restart&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
$command = "wget -qO- \"${panelURL}/gsp_api.php?gamemanager/restart&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}\" --no-check-certificate > /dev/null 2>&1";
break;
case "steam_auto_update":
$command = "wget -qO- \"${panelURL}/ogp_api.php?gamemanager/update&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}&type=steam\" --no-check-certificate > /dev/null 2>&1";
$command = "wget -qO- \"${panelURL}/gsp_api.php?gamemanager/update&token=${token}&ip=${ip}&port=${port}&mod_key=${mod_key}&type=steam\" --no-check-certificate > /dev/null 2>&1";
break;
}

View file

@ -85,7 +85,7 @@ if( !isset( $_POST['start_server'] ) )
<input type='hidden' name='home_id' value='$server_home[home_id]' />\n
<input type='hidden' name='remote_server_id' value='".$server_home['remote_server_id']."' />\n
<table class='start-server'>
<tr><td class='right'>". get_lang("ogp_agent_ip") .
<tr><td class='right'>". get_lang("gsp_agent_ip") .
":</td><td class='left'>".$server_home['agent_ip']."</td></tr>";
$max_players = $server_home['max_players'];
@ -565,7 +565,7 @@ elseif($server_home['home_id'] == $_POST['home_id'])
$db->changeLastParam($server_home['home_id'],json_encode($save_param));
echo "<table class='server-starting'>";
echo "<tr><td class='right'>". get_lang("ogp_agent_ip") .
echo "<tr><td class='right'>". get_lang("gsp_agent_ip") .
":</td><td class='left'>".$server_home['agent_ip']."</td></tr>\n";
echo "<tr><td class='right'>". get_lang("game_home") .
":</td><td class='left'>".$server_home['home_path']."</td></tr>";

View file

@ -28,7 +28,7 @@ function exec_ogp_module() {
{
$remote->remote_readfile( "screenlogs/screenlog.agent_restart", $restart_log );
echo "<pre class='log'><xmp>".$restart_log."</xmp></pre>";
$remote->remote_readfile( "screenlogs/screenlog.ogp_agent", $agent_log );
$remote->remote_readfile( "screenlogs/screenlog.gsp_agent", $agent_log );
if($agent_log == "")
{
$view->refresh("?m=server&p=restart&rhost_id=".$rhost_id."&refresh",5);
@ -54,7 +54,7 @@ function exec_ogp_module() {
} else if($_POST['re_check'] == "yes") {
// Confirmed... so restart the agent
$remote->exec( "if [ -e 'screenlogs/screenlog.agent_restart' ]; then rm -f 'screenlogs/screenlog.agent_restart'; fi && ".
"if [ -e 'screenlogs/screenlog.ogp_agent' ]; then rm -f 'screenlogs/screenlog.ogp_agent'; fi" );
"if [ -e 'screenlogs/screenlog.gsp_agent' ]; then rm -f 'screenlogs/screenlog.gsp_agent'; fi" );
$file_info = $remote->agent_restart();
// 5 seconds should be enough for the agent to come back up
echo get_lang("restarting"); # "Restarting agent... Please wait."

View file

@ -14,7 +14,7 @@ function exec_ogp_module() {
$remote = new OGPRemoteLibrary($remote_server['agent_ip'], $remote_server['agent_port'], $remote_server['encryption_key'], $remote_server['timeout'] );
if(isset($_POST['save_file']))
{
$file_info = $remote->remote_writefile('./ogp_agent.log', strip_real_escape_string($_REQUEST['file_content']));
$file_info = $remote->remote_writefile('./gsp_agent.log', strip_real_escape_string($_REQUEST['file_content']));
if ( $file_info === 1 )
{
print_success( get_lang("wrote_changes") );
@ -27,7 +27,7 @@ function exec_ogp_module() {
}
}
$data = "";
$file_info = $remote->remote_readfile('./ogp_agent.log',$data);
$file_info = $remote->remote_readfile('./gsp_agent.log',$data);
if ( $file_info === 0 )
{
print_failure( get_lang("not_found") );

View file

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before After
Before After

View file

@ -411,7 +411,7 @@ $(document).ready(function()
var boxClass = 'login-box';
var headerContent = '\
<!--<h1>' + headTitle + '</h1>-->\
<img src="themes/AdminLTE/dist/img/ogp_logo_dark.svg" class="brand-image">\
<img src="themes/AdminLTE/dist/img/gsp_logo_dark.svg" class="brand-image">\
';
if(new_form !== undefined)
@ -1287,7 +1287,7 @@ function themeChanger(changeTo, save = false)
if(!localStorage.getItem('themeLogo'))
{
$('img.brand-image').attr('src', 'themes/AdminLTE/dist/img/ogp_logo_dark.svg');
$('img.brand-image').attr('src', 'themes/AdminLTE/dist/img/gsp_logo_dark.svg');
}
$('link[href*="jquery-ui.min"]').attr('href', 'themes/AdminLTE/plugins/jquery-ui/jquery-ui.min.dark.css');
@ -1318,7 +1318,7 @@ function themeChanger(changeTo, save = false)
if(!localStorage.getItem('themeLogo'))
{
$('img.brand-image').attr('src', 'themes/AdminLTE/dist/img/ogp_logo_light.svg');
$('img.brand-image').attr('src', 'themes/AdminLTE/dist/img/gsp_logo_light.svg');
}
$('link[href*="jquery-ui.min"]').attr('href', 'themes/AdminLTE/plugins/jquery-ui/jquery-ui.min.light.css');
@ -1349,7 +1349,7 @@ function themeChanger(changeTo, save = false)
if(!localStorage.getItem('themeLogo'))
{
$('img.brand-image').attr('src', 'themes/AdminLTE/dist/img/ogp_logo_dark.svg');
$('img.brand-image').attr('src', 'themes/AdminLTE/dist/img/gsp_logo_dark.svg');
}
$('link[href*="jquery-ui.min"]').attr('href', 'themes/AdminLTE/plugins/jquery-ui/jquery-ui.min.light.css');

View file

@ -74,7 +74,7 @@
<aside class="main-sidebar sidebar-dark-primary elevation-4">
<!-- Brand Logo -->
<a class="brand-link text-center">
<img src="themes/AdminLTE/dist/img/ogp_logo_dark.svg" class="brand-image">
<img src="themes/AdminLTE/dist/img/gsp_logo_dark.svg" class="brand-image">
</a>
<!-- Sidebar -->