External command not working

edited July 2018 in Repetier-Server
Hi All,

I have a script I want to be able to call from the server interface that will backup the servers database/settings. I have the script which is working fine from the command line, but doesn't work when I call it from the web interface.

This is what I have in the extcommands.xml:

        <command>
                <name>Backup Settings</name>
                <execute>sudo /var/lib/Repetier-Server/scripts/backup.sh</execute>
                <confirm>Backup settings to home directory? WILL STOP SERVER WHILE BACKING UP!</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>false</print-permission>
            <!-- Define if command should show up only for users with add files permission, default false.-->
                <add-permission>false</add-permission>
            <!-- Define if command should show up only for users with del files permission, default false.-->
                <del-permission>false</del-permission>
            <!-- Define if command should show up only for users with configuration permission, default false.-->
                <config-permission>true</config-permission>
        </command>

I have even tried <execute>sudo /bin/sh /var/lib/Repetier-Server/scripts/backup.sh</execute> but that didn't work either :(

Comments

  • Have you added the script to the sudoer list of user repetierserver like we showed for shutdown?
Sign In or Register to comment.