diff --git a/mojotrollz/sai/saimod_mojotrollz_server_handling/saimod_mojotrollz_server_handling.php b/mojotrollz/sai/saimod_mojotrollz_server_handling/saimod_mojotrollz_server_handling.php
index 5cc5818..4a49851 100644
--- a/mojotrollz/sai/saimod_mojotrollz_server_handling/saimod_mojotrollz_server_handling.php
+++ b/mojotrollz/sai/saimod_mojotrollz_server_handling/saimod_mojotrollz_server_handling.php
@@ -5,7 +5,7 @@ class saimod_mojotrollz_server_handling extends \SYSTEM\SAI\SaiModule {
$vars['status_realm'] = self::sai_mod_saimod_mojotrollz_server_handling_action_realmstatus();
$vars['status_world'] = self::sai_mod_saimod_mojotrollz_server_handling_action_worldstatus();
return \SYSTEM\PAGE\replace::replaceFile(dirname(__FILE__).'/main.tpl', $vars);}
- public static function html_li_menu(){return '
server handling';}
+ public static function html_li_menu(){return '
Server';}
public static function right_public(){return false;}
public static function right_right(){return \SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI);}
public static function sai_mod_saimod_mojotrollz_server_handling_flag_js(){return \SYSTEM\LOG\JsonResult::toString(array(
@@ -14,35 +14,35 @@ class saimod_mojotrollz_server_handling extends \SYSTEM\SAI\SaiModule {
public static function sai_mod_saimod_mojotrollz_server_handling_flag_css(){}
public static function sai_mod_saimod_mojotrollz_server_handling_action_realmstart(){
- return shell_exec('/home/mojotrolls/mojo_zero/realm start 2>&1');}
+ return realm::start();}
public static function sai_mod_saimod_mojotrollz_server_handling_action_realmstop(){
- return shell_exec('/home/mojotrolls/mojo_zero/realm stop 2>&1');}
+ return realm::stop();}
public static function sai_mod_saimod_mojotrollz_server_handling_action_realmstatus(){
return realm::status();}
public static function sai_mod_saimod_mojotrollz_server_handling_action_worldstart(){
- return shell_exec('/home/mojotrolls/mojo_zero/world start 2>&1');}
+ return world::start();}
public static function sai_mod_saimod_mojotrollz_server_handling_action_worldstop(){
- return shell_exec('/home/mojotrolls/mojo_zero/world stop 2>&1');}
+ return world::stop();}
public static function sai_mod_saimod_mojotrollz_server_handling_action_worldstatus(){
return world::status();}
public static function sai_mod_saimod_mojotrollz_server_handling_action_compile(){
- return shell_exec('/home/mojotrolls/mojo_zero/compile 2>&1');}
+ return server::compile();}
public static function sai_mod_saimod_mojotrollz_server_handling_action_backup_db(){
- return shell_exec('/home/mojotrolls/mojo_zero/backup_db 2>&1');}
+ return database::backup();}
public static function sai_mod_saimod_mojotrollz_server_handling_action_deploy(){
- return shell_exec('/home/mojotrolls/mojo_zero/deploy 2>&1');}
+ return server::deploy();}
public static function sai_mod_saimod_mojotrollz_server_handling_action_revert(){
- return shell_exec('/home/mojotrolls/mojo_zero/revert 2>&1');}
+ return server::revert();}
public static function sai_mod_saimod_mojotrollz_server_handling_action_rights(){
- return shell_exec('/home/mojotrolls/mojo_zero/rights 2>&1');}
+ return server::rights();}
public static function sai_mod_saimod_mojotrollz_server_handling_action_update(){
- return shell_exec('/home/mojotrolls/mojo_zero/update 2>&1');}
+ return server::update();}
public static function sai_mod_saimod_mojotrollz_server_handling_db_pull(){
- return shell_exec('/home/mojotrolls/mojo_zero/src/database/mojo/pull 2>&1');}
+ return database::pull();}
public static function sai_mod_saimod_mojotrollz_server_handling_db_push(){
- return shell_exec('/home/mojotrolls/mojo_zero/src/database/mojo/push 2>&1');}
+ return database::push();}
public static function sai_mod_saimod_mojotrollz_server_handling_db_push_dev(){
- return shell_exec('/home/mojotrolls/mojo_zero/src/database/mojo/push_dev 2>&1');}
+ return database::push_dev();}
public static function sai_mod_saimod_mojotrollz_server_handling_db_commit($comment){
- return shell_exec('/home/mojotrolls/mojo_zero/src/database/mojo/commit '.$comment.' 2>&1');}
+ return database::commit($comment);}
}
\ No newline at end of file
diff --git a/mojotrollz/sai/sql/server_handling.sql b/mojotrollz/sai/sql/server_handling.sql
new file mode 100644
index 0000000..0c25123
--- /dev/null
+++ b/mojotrollz/sai/sql/server_handling.sql
@@ -0,0 +1,2 @@
+INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1000, 42, 0, 0, 'saimod_mojotrollz_server_handling', 'action', NULL);
+