Advertisement
Guest User

Untitled

a guest
Sep 16th, 2016
793
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1.  
  2. <config>
  3. <!--
  4. If you want to run external commands, enter them in this configuration with
  5. full path. You will see them in the main menu. Copy this file into the
  6. <storage>/database directory.
  7.  
  8. Security consideration: The reason there is no online editor for this is simply
  9. security. The commands you enter here are executed with the privileges of the
  10. daemon running the server. If you would allow online configuration, a hacker could
  11. simply add any command he needs to hack your system.
  12. -->
  13. <command>
  14. <name>Shutdown Server</name>
  15. <execute>sudo /sbin/shutdown -h now</execute>
  16. <confirm>Really shut down the server?</confirm>
  17. </command>
  18. <command>
  19. <name>Reboot Server</name>
  20. <execute>sudo /sbin/shutdown -r now</execute>
  21. <confirm>Really reboot the server?</confirm>
  22. </command>
  23. <!--custom commands-->
  24. <command>
  25. <name>Power Off Printer</name>
  26. <execute>gpio -g mode 26 out && gpio -g write 26 1</execute>
  27. <confirm>Really poweroff the printer</confirm>
  28. </command>
  29. <!-- <command>
  30. <name>Power On Printer</name>
  31. <execute>gpio -g mode 26 out && gpio -g write 26 0</execute>
  32. <confirm></confirm>
  33. </command>
  34. -->
  35.  
  36. <!--
  37. G-code files can contain
  38. @execute cmd param1 param2
  39. commands. To prevent external users from executing unwanted or dangerous commands,
  40. only commands defined here are allowed to execute. More over, only the shortcuts
  41. defined here are to be used as cmd in @execute. Prevent parameter where ever possible.
  42. -->
  43. <execute name="play" allowParams="true">/usr/bin/afplay</execute><!-- play the sound file on moc os x -->
  44. </config>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement