Skip to content

Commit

Permalink
set services properly
Browse files Browse the repository at this point in the history
  • Loading branch information
sudocurse committed Jun 29, 2020
1 parent 1c4b078 commit c7e5a1e
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 9 deletions.
54 changes: 45 additions & 9 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

2 changes: 2 additions & 0 deletions draft-rm-install
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c7e5a1e

Please sign in to comment.