Revert "Complete rebrand from Open Game Panel (OGP) to GameServer Panel (GSP)"

This commit is contained in:
Frank Harris 2025-09-08 12:42:34 -05:00 committed by GitHub
parent 02c94766c6
commit deee7d6ac5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
308 changed files with 1412 additions and 1412 deletions

View file

@ -1,7 +1,7 @@
<?php
/*
This FTP addon works with EHCP (www.ehcp.net)
It allows GSP - the GameServer Panel - to manage custom FTP user accounts
It allows OGP - the open game panel - to manage custom FTP user accounts
by own3mall
*/
@ -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 gsp_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 ogp_agent install directory under the EHCP folder with permissions of 777", E_USER_NOTICE);
}
fclose($createLog);
}

View file

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

View file

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

View file

@ -4,7 +4,7 @@
# GF: Config is in $agent_dir/Cfg/Config.pm
agent_dir=GSP_AGENT_DIR
agent_dir=OGP_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=GSP_AGENT_DIR
agent_dir=OGP_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#{GSP_AGENT_PATH}#$AGENTDIR#g" "${SystemDDir}/ogp_agent.service"
echo "$sudoPass" | sudo -S -p "" sed -i "s#{OGP_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 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)."
# 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)."
sed -i "s|OGP_USER|${username}|" ${init_file} || failed "Failed to modify init file ($init_file)."
chmod a+x $init_file

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, 'gsp_agent.pid');
Path::Class::File->new(AGENT_RUN_DIR, 'ogp_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 gsp_agent user's homedir so that other users can access their owned files within this dir
# Fix perms on ogp_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 "gsp_agent_run.pid")
if(-e "ogp_agent_run.pid")
{
my $init_pid = `cat gsp_agent_run.pid`;
my $init_pid = `cat ogp_agent_run.pid`;
chomp($init_pid);
if(kill 0, $init_pid)
{
my $or_exist = "";
my $rm_pid_file = "";
if(-e "gsp_agent.pid")
if(-e "ogp_agent.pid")
{
$rm_pid_file = " gsp_agent.pid";
my $agent_pid = `cat gsp_agent.pid`;
$rm_pid_file = " ogp_agent.pid";
my $agent_pid = `cat ogp_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 gsp_agent_run.pid $rm_pid_file\necho \" [OK]\"\n".
"rm -f ogp_agent_run.pid $rm_pid_file\necho \" [OK]\"\n".
"echo -n \"Starting OGP Agent...\"\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".
"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".
"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]}.gspmod"'."\n".
' echo "${mod_name[$i]}" > "${mods_info_path}${mod_string[$i]}.ogpmod"'."\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 =~ /\.gspmod$/)
if($mod_info_file =~ /\.ogpmod$/)
{
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#{GSP_AGENT_PATH}#$AGENTDIR#g" "${SystemDDir}/ogp_agent.service"
echo "$sudoPass" | sudo -S -p "" sed -i "s#{OGP_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

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