| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision |
| docs:guide-user:base-system:managing_services [2020/09/23 15:28] – [Web interface] optimize description vgaetera | docs:guide-user:base-system:managing_services [2023/10/14 05:46] – update vgaetera |
|---|
| ===== Introduction ===== | ===== Introduction ===== |
| * There are multiple [[docs:guide-user:services:start|services]] running on OpenWrt to perform different tasks. | * There are multiple [[docs:guide-user:services:start|services]] running on OpenWrt to perform different tasks. |
| * This how-to describes the methods for managing OpenWrt services. | * This how-to describes the method for managing OpenWrt services. |
| |
| ===== Goals ===== | ===== Goals ===== |
| * Start, stop, restart, enable and disable system services. | * Start, stop, restart, enable and disable system services. |
| | * Check if a specific service is enabled and running. |
| |
| ===== Web interface ===== | ===== Web interface instructions ===== |
| Manage services using web interface. | Manage services using web interface. |
| - Navigate to **[[http://openwrt.lan/|LuCI]] -> System -> Startup**. | - Navigate to **LuCI -> System -> Startup**. |
| - See the list of all the available services and use buttons to execute actions. | - See the list of all the available services and use buttons to execute actions. |
| |
| ===== Command-line interface ===== | ===== Command-line instructions ===== |
| Commands to manage system services. | Manage services using command-line interface. |
| Use the invocation column inside [[docs:guide-developer:write-shell-script|scripts]] or [[docs:guide-user:base-system:cron|cron]]. | Use the invocation column inside [[docs:guide-developer:write-shell-script|scripts]], [[docs:guide-user:base-system:hotplug|hotplug]] or [[docs:guide-user:base-system:cron|cron]]. |
| | Check [[docs:guide-user:base-system:log.essentials|syslog]] for troubleshooting. |
| |
| ^ Command ^ Invocation ^ Description ^ | ^ Command ^ Equivalent ^ Description ^ |
| | ''service'' | ''ls /etc/init.d'' | Print a list of available services | | | ''service'' | ''ls /etc/init.d'' | Print a list of available services. | |
| | ''service servicename'' | ''/etc/init.d/servicename'' | Print a list of available actions for a service | | | ''service <service>'' | ''/etc/init.d/<service>'' | Print a list of available actions for a service. | |
| | ''service servicename action'' | ''/etc/init.d/servicename action'' | Execute that action on that service | | | ''service <service> <action>'' | ''/etc/init.d/<service> <action>'' | Execute that action on a specific service. | |
| | ''service servicename action instance'' | ''/etc/init.d/servicename action instance'' | Execute that action on that service instance, e.g. specific OpenVPN connection | | | ''service <service> <action> <instance>'' | ''/etc/init.d/<service> <action> <instance>'' | Execute that action on a specific service instance, e.g. OpenVPN connection. | |
| |
| Common actions supported by most services. | Common actions supported by most services. |
| |
| ^ Action ^ Description ^ | ^ Action ^ Description ^ |
| | ''start'' | Start the service | | | ''start'' | Start the service. | |
| | ''stop'' | Stop the service | | | ''stop'' | Stop the service. | |
| | ''restart'' | Restart the service | | | ''restart'' | Restart the service. | |
| | ''reload'' | Reload configuration files or restart if that fails | | | ''reload'' | Reload configuration files or restart if that fails. | |
| | ''enable'' | Enable service autostart | | | ''enable'' | Enable service autostart. | |
| | ''disable'' | Disable service autostart | | | ''disable'' | Disable service autostart. | |
| | | ''enabled'' | Check if the service is enabled. | |
| | | ''running'' | Check if the service is running. | |
| |