Lets you restart services on your system from within remoteCP
English and German translations are included.
Restart/
into the plugins/
directory of your remoteCP installation<plugin>Restart</plugin>
to your xml/settings/<settingset>/settings.xml
plugins/Restart/settings.xml
fileofflinelogin
maintenance
index.php
of this plugin by settings different values for$vpermissions
(Permission to view the status of the services)$apermissions
(Permission to start/stop/restart the services)For each service you have to specify a command that handles the actual operations (start, stop, restart and status).
It must adhere to the LSB 5.0 Chapter 22.2. That way, if you already have conforming init scripts for the services, you can just call them and pass their exit codes and output through. Output will be shown in the webinterface only in case of an error (that is, exit code ≠ 0).
As you usually need root privileges to use the init scripts, a script is included to help with this (userrestart.sh
). It relies on the sudo
and service
commands and has been tested on Debian 8, but should work on any system offering these two commands. You can use it like this:
userrestart.sh
to a suitable location that is in your webservers $PATH
, /usr/local/bin/
should dochmod +x
)userrestart.sh
, modify line 6 to include all the services you want the plugin to operate on (this is an additional security measure)www-data
) execute the script as root without password promptsThe settings.xml
can be left as is (except for the names of the services) since it is preconfigured to work with the userrestart.sh
script.
I didn’t include any commands on purpose because you must understand what you are doing when dealing with sudo instead of just copy-pasting commands from the internet.
Feel free to open an issue on this project.
remotecp-plugin-restart is licensed under the GNU General Public License Version 3. You should have received a copy of the GNU General Public License along with this program (See LICENSE
). If not, see http://www.gnu.org/licenses/.