Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
3ddrucker [2020/04/14 12:46]
mschubi [Repetier-Server auf OrangPi Lite]
3ddrucker [2020/04/14 12:59] (current)
mschubi [Repetier-Server auf OrangPi Lite]
Line 103: Line 103:
 </​code>​ </​code>​
  
-In /usr/local/​Repetier-Server/​etc/RepetierServer.xml+In ///var/lib/​Repetier-Server/​database/extcommands.xml//
 <code bash> <code bash>
-<​command>​ +<​config>​ 
- <​name>​Shutdown Server</​name>​ + <!-- 
- <​execute>​sudo /​sbin/​shutdown -h now</​execute>​ +       If you want to run external commands, enter them in this configuration with 
- <​confirm>​Really shut down the server?</​confirm>​ +       full path. You will see them in the main menu. Copy this file into the 
-</​command>​ +       <​storage>/​database directory. 
-<​command>​ + 
- <​name>​Reboot Server</​name>​ +       ​Security consideration:​ The reason there is no online editor for this is simply 
- <​execute>​sudo /​sbin/​shutdown -r now</​execute>​ +       ​security. The commands you enter here are executed with the privileges of the 
- <​confirm>​Really reboot the server?</​confirm>​ +       ​daemon running the server. If you would allow online configuration,​ a hacker could 
-</​command>​+       ​simply add any command he needs to hack your system. 
 + 
 +      ​Commands are normally visible in the global menu. If you want one to appear only in 
 +      in the printer menu, add the attribute "​slugname"​ to command. You see the slugname 
 +      when you select a printer as part of the path. 
 +    --> 
 + <​command>​ 
 + <​name>​Shutdown Server</​name>​ 
 + <​execute>​sudo /​sbin/​shutdown -h now</​execute>​ 
 + <​confirm>​Really shut down the server?</​confirm
 +     <!-- Define if command should show up in local printer interface, default true.-->​ 
 + <​local>​true</​local>​ 
 +     <!-- Define if command should show up in remote printer interface, default true.-->​ 
 + <​remote>​true</​remote>​ 
 +     <!-- Define if command should show up only for users with print permission, default true.-->​ 
 + <​print-permission>​true</​print-permission>​ 
 +     <!-- Define if command should show up only for users with add files permission, default false.-->​ 
 + <​add-permission>​true</​add-permission>​ 
 +     <!-- Define if command should show up only for users with del files permission, default false.-->​ 
 + <​del-permission>​true</​del-permission>​ 
 +     <!-- Define if command should show up only for users with configuration permission, default false.-->​ 
 + <​config-permission>​true</​config-permission
 + </​command>​ 
 + <​command>​ 
 + <​name>​Reboot Server</​name>​ 
 + <​execute>​sudo /​sbin/​shutdown -r now</​execute>​ 
 + <​confirm>​Really reboot the server?</​confirm>​ 
 + </​command
 + 
 + <!-- 
 +        G-code files can contain 
 +        @execute cmd param1 param2 
 +        commands. To prevent external users from executing unwanted or dangerous commands, 
 +        only commands defined here are allowed to execute. More over, only the shortcuts 
 +        defined here are to be used as cmd in @execute. Prevent parameter where ever possible. 
 +    --> 
 + <​execute name="​play"​ allowParams="​true">/​usr/​bin/​afplay</​execute><​!-- play the sound file on moc os x --> 
 +</config>
 </​code>​ </​code>​
  
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International