On 04/01/2015 07:43 PM, Mike Cornelius wrote: > Having now managed to install some snapps on my system I'm once again > stuck on something which must be pretty simple. > > What is the correct way to start an installed service snapp (eg. webdm)? > > 'service webdm start' gives me:- > > ubuntu@localhost:~$ service webdm start > webdm: unrecognized service > > > I can start webdm using the following command from the console:- > > /apps/webdm/current/snappyd > > But I'm sure that's not correct. >
Snappy uses systemd so stopping and starting services needs to use systemctl.
Eg:
$ systemctl list-units --no-pager | grep webdm webdm_avahi_0.1.service
loaded active running
Avahi daemon
webdm_snappyd_0.1.service
loaded active running Snappy WebDM
$ systemctl status webdm_snappyd_0.1.service
$ sudo systemctl stop webdm_snappyd_0.1.service # needs sudo
$ sudo systemctl start webdm_snappyd_0.1.service # needs sudo
Service files are in /etc/systemd/system. Eg:
$ cat /etc/systemd/system/webdm_snappyd_0.1.service
[Unit]
Description=Snappy WebDM
After=apparmor.service click-system-hooks.service
Requires=apparmor.service click-system-hooks.service
X-Snappy=yes
[Service]
ExecStart=/apps/webdm/0.1/snappyd
WorkingDirectory=/apps/webdm/0.1
Environment="SNAPP_APP_PATH=/apps/webdm/0.1"
"SNAPP_APP_DATA_PATH=/var/lib/apps/webdm/0.1"
"SNAPP_APP_USER_DATA_PATH=%h/apps/webdm/0.1" "SNAP_APP_PATH=/apps/webdm/0.1"
"SNAP_APP_DATA_PATH=/var/lib/apps/webdm/0.1"
"SNAP_APP_USER_DATA_PATH=%h/apps/webdm/0.1" "SNAP_APP=webdm_snappyd_0.1"
AppArmorProfile=webdm_snappyd_0.1
[Install]
WantedBy=multi-user.target
Hope this helps!
--
Jamie Strandboge http://www.ubuntu.com/
signature.asc
Description: OpenPGP digital signature
-- snappy-devel mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snappy-devel
