Skip to content
CurlyMoo edited this page Jan 21, 2013 · 6 revisions

All commands in the network module gives a return code of either 0 or 1, where 0 is Failure and 1 is success. Other codes that can be expected are:

-  4: Running but autostart disabled
-  3: Not running but autostart enabled
-  2: Not running and autostart disabled
-  1: Success
-  0: Failed
- -1: Invalid number of arguments
- -2: Service not available
- -3: Service already running
- -4: Service already stopped
- -5: Autostart already enabled
- -6: Autostart already disabled

Empty

root@xbian:~# xbian-config services
Available arguments for module 'services' are:
list status start restart stop autostart insert update delete

[list]

root@xbian:~# xbian-config services list
apache2
couchpotato
headphones
lirc
nzbgetd
sabnzbdplus
samba
sickbeard
ssh
transmission
xbmc

[status]

root@xbian:~# xbian-config services status
apache2 5
couchpotato 2
headphones 2
lirc 5
nzbgetd 2
sabnzbdplus 2
samba 5
sickbeard 2
ssh 5
transmission 2
xbmc 5

[start]

root@xbian:~# xbian-config services start xbmc
1

[restart]

root@xbian:~# xbian-config services restart xbmc
1

[autostart]

root@xbian:~# xbian-config services autorestart xbmc enable
1
root@xbian:~# xbian-config services autorestart xbmc disable
1

[insert|update]

The first argument of insert is always the name of the service. The subsequent number of arguments are the daemon that the service consists of. Samba consists of the nmbd and smbd daemon. So they both need to run to succesfully run the samba service. Just like xbmc consists of xbmc.bin as its daemon.

root@xbian:~# xbian-config services insert samba nmbd smbd                     
1

The apache2 service is just called apache2 so no additional arguments are needed.

root@xbian:~# xbian-config services insert apache2              
1

[delete]

root@xbian:~# xbian-config services delete apache2              
1
Clone this wiki locally