command descriptions

This commit is contained in:
GenZmeY 2020-09-21 05:41:30 +03:00 committed by Евгений Юдаков
parent 8d29aff13c
commit 32a7d722a2
30 changed files with 74 additions and 50 deletions

View File

@ -46,7 +46,6 @@ builddep:
prep: clean-tmp
cd $(SOURCESDIR) && tar czf $(SOURCETARBALL) \
config \
force-attr \
main \
COPYING \
Makefile

View File

@ -35,7 +35,8 @@ function cmd_info ()
function cmd_help ()
{
echo "TODO: description"
echo "Id can be SteamID3, SteamID64 or a link to a user profile."
echo "EGS players are not supported."
}
function cmd_main () # $*: ban list

View File

@ -35,7 +35,8 @@ function cmd_info ()
function cmd_help ()
{
echo "TODO: description"
echo "Id can be SteamID3, SteamID64 or a link to a user profile."
echo "EGS players are not supported."
}
function cmd_main () # $*: ban list

View File

@ -33,10 +33,10 @@ function cmd_info ()
echo "Show the list of blocked users"
}
function cmd_help ()
{
echo "TODO: description"
}
#function cmd_help ()
#{
# echo ""
#}
function cmd_main ()
{

View File

@ -33,10 +33,10 @@ function cmd_info ()
echo "Sync blocklist for all servers"
}
function cmd_help ()
{
echo "TODO: description"
}
#function cmd_help ()
#{
# echo ""
#}
function cmd_main ()
{

View File

@ -35,7 +35,10 @@ function cmd_info ()
function cmd_help ()
{
echo "TODO: description"
echo "By default, all files created by the kf2 server"
echo "have 600 permissions, which can be inconvenient."
echo "This command fixes the permissions and groups of"
echo "all ini files to the values specified in kf2-srv.conf"
}
function cmd_main ()

View File

@ -35,7 +35,7 @@ function cmd_info ()
function cmd_help ()
{
echo "TODO: description"
echo "Run the server binary directly, without systemd or anything else."
}
function cmd_main ()

View File

@ -35,7 +35,8 @@ function cmd_info ()
function cmd_help ()
{
echo "TODO: description"
echo "Stops all running server instances, installs updates (if any)"
echo "When finished, starts all enabled instances."
}
function cmd_main ()

View File

@ -35,7 +35,8 @@ function cmd_info ()
function cmd_help ()
{
echo "TODO: description"
echo "Stops all running server instances, validate server files."
echo "When finished, starts all enabled instances."
}
function cmd_main ()

View File

@ -35,7 +35,7 @@ function cmd_info ()
function cmd_help ()
{
echo "TODO: description"
echo "Name(s) must not contain spaces."
}
function cmd_main ()

View File

@ -30,12 +30,12 @@ function cmd_usage ()
function cmd_info ()
{
echo "Send message to specified server instances"
echo "Send message to specified server instance(s)"
}
function cmd_help ()
{
echo "TODO: description"
echo "If instance is not specified, sends a message to all running servers."
}
function cmd_main ()

View File

@ -30,12 +30,12 @@ function cmd_usage ()
function cmd_info ()
{
echo "Delete the specified server instances"
echo "Delete the specified server instance(s)"
}
function cmd_help ()
{
echo "TODO: description"
echo "If instance is not specified, deletes all server instances."
}
function cmd_main ()

View File

@ -30,12 +30,12 @@ function cmd_usage ()
function cmd_info ()
{
echo "Disable specified server instance(s)"
echo "Disable autostart for specified server instance(s)"
}
function cmd_help ()
{
echo "TODO: description"
echo "If instance is not specified, disable autostart for all instances."
}
function cmd_main ()

View File

@ -30,12 +30,12 @@ function cmd_usage ()
function cmd_info ()
{
echo "Enable specified server instance(s)"
echo "Enable autostart for specified server instance(s)"
}
function cmd_help ()
{
echo "TODO: description"
echo "If instance is not specified, disable autostart for all instances."
}
function cmd_main ()

View File

@ -35,7 +35,7 @@ function cmd_info ()
function cmd_help ()
{
echo "TODO: description"
echo "If instance is not specified, displays the status of all instances."
}
function cmd_main ()

View File

@ -35,7 +35,7 @@ function cmd_info ()
function cmd_help ()
{
echo "TODO: description"
echo "If instance is not specified, restarts all enabled instances."
}
function cmd_main ()

View File

@ -35,7 +35,7 @@ function cmd_info ()
function cmd_help ()
{
echo "TODO: description"
echo "If instance is not specified, starts all enabled instances."
}
function cmd_main ()

View File

@ -35,7 +35,7 @@ function cmd_info ()
function cmd_help ()
{
echo "TODO: description"
echo "If instance is not specified, stops all instances."
}
function cmd_main ()

View File

@ -35,7 +35,7 @@ function cmd_info ()
function cmd_help ()
{
echo "TODO: description"
echo "If instance is not specified, prints the log of all instances."
}
function cmd_main ()

View File

@ -35,7 +35,7 @@ function cmd_info ()
function cmd_help ()
{
echo "TODO: description"
echo "If instance is not specified, prints the log of all instances in real time."
}
function cmd_main ()

View File

@ -35,7 +35,7 @@ function cmd_info ()
function cmd_help ()
{
echo "TODO: description"
echo "If instance is not specified, load map rotation for all instances."
}
function cmd_main () # $*: Instance[s]

View File

@ -35,7 +35,7 @@ function cmd_info ()
function cmd_help ()
{
echo "TODO: description"
echo "If instance is not specified, save map rotation for all instances."
}
function cmd_main () # $*: Instance[s]

View File

@ -35,7 +35,9 @@ function cmd_info ()
function cmd_help ()
{
echo "TODO: description"
echo "If instance is not specified, set a admin password for all instances."
echo "To remove a password, use an empty password as an argument,"
echo "example: ${ScriptFullname}${KF2POSTFIX} password admin '' test_instance"
}
function cmd_main ()

View File

@ -35,7 +35,9 @@ function cmd_info ()
function cmd_help ()
{
echo "TODO: description"
echo "If instance is not specified, set a game password for all instances."
echo "To remove a password, use an empty password as an argument,"
echo "example: ${ScriptFullname}${KF2POSTFIX} password game '' test_instance"
}
function cmd_main ()

View File

@ -25,7 +25,7 @@ cmd_need_installed_server () { false ;}
function cmd_usage ()
{
echo "[<workshop_id>...]"
echo "<workshop_id>..."
}
function cmd_info ()
@ -35,7 +35,7 @@ function cmd_info ()
function cmd_help ()
{
echo "TODO: description"
echo "workshop_id can be a resource ID or a link to a resource in workshop."
}
function cmd_main ()

View File

@ -35,7 +35,7 @@ function cmd_info ()
function cmd_help ()
{
echo "TODO: description"
echo "workshop_id can be a resource ID or a link to a resource in workshop."
}
function cmd_main ()

View File

@ -33,10 +33,10 @@ function cmd_info ()
echo "Show the list of steam workshop resources"
}
function cmd_help ()
{
echo "TODO: description"
}
#function cmd_help ()
#{
# echo ""
#}
function cmd_main ()
{

View File

@ -30,12 +30,13 @@ function cmd_usage ()
function cmd_info ()
{
echo "Sync steamorkshop resources between all server instances"
echo "Sync steam workshop resources between all server instances"
}
function cmd_help ()
{
echo "TODO: description"
echo "In addition to synchronization, adds loaded maps and mutators to KFGame.ini."
echo "This command works for stopped server instances only."
}
function cmd_main ()

View File

@ -197,10 +197,22 @@ elif [[ -d "$GroupPathname" ]]; then
shift
source "$CommandPathName"
if is_help "$1"; then
if function_exists "cmd_help"; then
cmd_help
else
if ! function_exists "cmd_usage" \
&& ! function_exists "cmd_info" \
&& ! function_exists "cmd_help"; then
echo "No help page for this command."
else
if function_exists "cmd_usage"; then
echo "usage: $(cmd_usage)"
echo
fi
if function_exists "cmd_info"; then
cmd_info
echo
fi
if function_exists "cmd_help"; then
cmd_help
fi
fi
elif is_usage "$1"; then
if function_exists "cmd_usage"; then

View File

@ -1,7 +1,7 @@
%global steamuser steam
Name: kf2-srv
Version: 0.15.8
Version: 0.15.9
Release: 1%{dist}
Summary: Killing Floor 2 server
Group: Amusements/Games
@ -74,7 +74,6 @@ rm -rf $RPM_BUILD_ROOT
%attr(0644,root,root) %config(noreplace) %{_prefix}/lib/firewalld/services/%{name}.xml
%attr(0755,root,root) %{_bindir}/%{name}
%attr(0755,root,root) %{_bindir}/%{name}-beta
%attr(0755,root,root) %{_sbindir}/%{name}-force-attr
%attr(0644,root,root) %{_unitdir}/*
%attr(0644,root,root) %doc %{_datadir}/licenses/%{name}/*
%attr(0644,root,root) %{_sysconfdir}/rsyslog.d/%{name}.conf
@ -101,8 +100,10 @@ if [[ $1 == 1 ]]; then # Install
fi
%changelog
* Tue Sep 8 2020 GenZmeY <genzmey@gmail.com> - 0.16.0-1
- log cmg group.
* Mon Sep 21 2020 GenZmeY <genzmey@gmail.com> - 0.16.0-1
- remove force-attr daemon;
- log cmg group;
- command descriptions.
* Sat Aug 15 2020 GenZmeY <genzmey@gmail.com> - 0.15.4-1
- fixed broken update;