g2_link admin bugfix

pull/1/head
Tom Early 10 years ago
parent 153c8d7035
commit 661e9ed984

@ -195,6 +195,7 @@ Then the script exec_1.sh will be executed.
Two scripts, exec_R.sh and exec_H.sh are included to reboot and halt your Two scripts, exec_R.sh and exec_H.sh are included to reboot and halt your
system, respectively. Also note that the MYCALL is passed to these scripts\ system, respectively. Also note that the MYCALL is passed to these scripts\
so you can use this as an input parameter for your scripts. so you can use this as an input parameter for your scripts.
Only admins can execute scripts so
7) 7)
Enabling and disabling INCOMING HotSpotNode connections: Enabling and disabling INCOMING HotSpotNode connections:

@ -1,7 +1,7 @@
# g2_ircddb Configuration for me # g2_ircddb Configuration for me
ircddb = { ircddb = {
login = "MYCALL" login = "XX0XXX"
# If you are not using rr.openquad.net, you need to specify the host and possibly the password. # If you are not using rr.openquad.net, you need to specify the host and possibly the password.
# #
# host = "some.server.host" // others include group1-irc.ircddb.net # host = "some.server.host" // others include group1-irc.ircddb.net
@ -24,6 +24,9 @@ module = {
} }
g2_link = { g2_link = {
# add the callsigns that can shutdown or reboot your system
# admin = [ "XX0XXX" , "YY0YYY" ] // only these users can execute scripts
# link to the reflector of your choice. the first character is the module you are linking. # link to the reflector of your choice. the first character is the module you are linking.
# link_at_start = "CREF001C" # link_at_start = "CREF001C"
} }

@ -240,7 +240,7 @@ g2_link = {
# link_at_start = "NONE" # Link to a reflector at startup. # link_at_start = "NONE" # Link to a reflector at startup.
# to link repeater module B to REF001 C, use "BREF001C" # to link repeater module B to REF001 C, use "BREF001C"
# ref_login = "" # for loging into REF reflectors, if undefined, ircddb.username will be used # ref_login = "" # for loging into REF reflectors, if undefined, ircddb.username will be used
# users = [ "CALL1", "CALL2", "CALL3" ] # if defined, only these users can use this gateway # admin = [ "CALL1", "CALL2", "CALL3" ] # if defined, only these users can execute scripts, block dongles and reload the gwys.txt
# link_unlink = [ "CALL4", "CALL5", "CALL6" ] # if defined, only these users can link and unlink a repeater # link_unlink = [ "CALL4", "CALL5", "CALL6" ] # if defined, only these users can link and unlink a repeater
# incoming_ip = "0.0.0.0" # incoming ip address, "0.0.0.0" means accepts all connections. # incoming_ip = "0.0.0.0" # incoming ip address, "0.0.0.0" means accepts all connections.
# ip = "127.0.0.1" # where g2_link is running # ip = "127.0.0.1" # where g2_link is running

@ -867,7 +867,7 @@ static bool read_config(char *cfgFile)
return 1; return 1;
} }
string key = "g2_link.users"; string key = "g2_link.admin";
only_admin_login = false; only_admin_login = false;
if (cfg.exists(key)) { if (cfg.exists(key)) {
Setting &userlist = cfg.lookup(key); Setting &userlist = cfg.lookup(key);
@ -926,7 +926,7 @@ static bool read_config(char *cfgFile)
return 1; return 1;
} }
traceit("%s = [ "); traceit("%s = [ ");
for (link_unlink_user_pos=admin.begin(); link_unlink_user_pos!=admin.end(); link_unlink_user_pos++) for (link_unlink_user_pos=link_unlink_user.begin(); link_unlink_user_pos!=link_unlink_user.end(); link_unlink_user_pos++)
traceit("%s ", link_unlink_user_pos->c_str()); traceit("%s ", link_unlink_user_pos->c_str());
traceit("]\n"); traceit("]\n");
} }

Loading…
Cancel
Save

Powered by TurnKey Linux.