From c7e5a1ec67c393e9ffa095ca3337130f3f3a5620 Mon Sep 17 00:00:00 2001 From: Ankeet Presswala Date: Mon, 29 Jun 2020 09:56:14 +0000 Subject: [PATCH] set services properly --- INSTALL.md | 54 ++++++++++++++++++++++++++++++++++++++++-------- draft-rm-install | 2 ++ 2 files changed, 47 insertions(+), 9 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 223ba03..cb551d7 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -57,16 +57,52 @@ make ``` Again you can run `file src/frontend/mosh-client` to ensure it's an ARM binary that was produced. -### 4. Deploy +### 4. Deploy (File reference) -You can view debug logs for draft and any app that draft tries to launch by running `journalctl -fu draft`. +Because of limited space on the root partition, it's better to install draft to /home/root. -#### File reference -If you use the scripts above you shouldn't need to worry about these. -* `draft` binary goes in /usr/bin -* `mkdir -p /usr/share/draft/qml; mkdir -p /usr/share/draft js` all of the files in the `qml/` and `js/` directories should go into these folders -* Copy `extra-files/draft/` into `/etc/` so `/etc/draft/01-xochitl` etc exist. These are the files that define which apps to run and how, in addition to icons (see above for full details). -* Copy `extra-files/draft.service` to `/lib/systemd/system/draft.service` to install the systemd file. This will install - draft as a system service. Then you'll need to `systemctl disable xochitl && systemctl enable draft` to replace +``` +/home/root/draft +├── etc +│   ├── 01-xochitl +│   ├── 02-fingerterm +│   ├── 99-shutdown +│   └── icons +│   ├── fingerterm.png +│   ├── power.png +│   └── xochitl.png +├── lib +│   └── systemd +│   └── system +│   └── draft.service +└── usr + ├── bin + │   └── draft + └── share + └── draft + ├── js + │   └── Main.js + └── qml + ├── Main.qml + └── MenuItem.qml +``` + +To achieve this: +* `draft` binary goes in usr/bin +* `mkdir -p usr/share/draft/qml; mkdir -p usr/share/draft js` all of the files in the `qml/` and `js/` directories should go into these folders +* Copy `extra-files/draft/` into `etc/` so `/etc/draft/01-xochitl` etc exist. These are the files that define which apps to run and how, in addition to icons (see above for full details). +* Copy `extra-files/draft.service` to `/lib/systemd/system/draft.service` to install the systemd file. + +(Note that paths are relative to /home/root/draft or your install directory of choice. + +Finally, you'll want to link all of these files to the desired locations on the root partition: + +``` +cd /home/root/draft +find {etc,usr,lib} -type d -exec mkdir -p /{} \; +find {etc,usr,lib} -type f -exec ln -s /home/root/draft/{} /{} \; +``` + +This will install draft as a system service. Then you'll need to `systemctl enable draft && systemctl disable xochitl to replace `xochitl` with `draft` as the startup app. Reboot, or to see it take effect right away, do `systemctl stop xochitl && systemctl start draft`. diff --git a/draft-rm-install b/draft-rm-install index 572a72c..5d3d299 100755 --- a/draft-rm-install +++ b/draft-rm-install @@ -26,6 +26,8 @@ cd /home/root/draft find {etc,usr,lib} -type d -exec mkdir -p /{} \; find {etc,usr,lib} -type f -exec ln -s /home/root/draft/{} /{} \; +systemctl enable draft systemctl start draft +systemctl disable xochitl systemctl stop xochitl EOH