]> git.sesse.net Git - pistorm/blobdiff - boot_scripts/README.md
Cleanup warnings and LinuxJedi's docs
[pistorm] / boot_scripts / README.md
index 9156a82cc38d29cb6224fe588fe1f1fdefa1bf61..e12a598d7f66a43f9c61c7ef6502c61d7acf22d0 100644 (file)
@@ -2,13 +2,59 @@
 
 ## Bootup script
 
+For your convience a startup script for systemd in Linux is located in this directory. This script will start PiStorm *before* the network connections have started.
+
+### Installation
+
 To start PiStorm on automatically on boot, copy `pistorm.service` into /etc/systemd/system/ in your Pi's filesystem. Then run:
 
 ```bash
 sudo systemctl enable pistorm
 ```
+### Customisation
+
+There are some things you may want to change in the systemd script. These instructions will help with that.
+
+#### Custom config
+
+If you wish to boot using a custom configuration file change `ExecStart` to:
+
+```ini
+ExecStart=/home/pi/pistorm/emulator --config-file myconfig.cfg
+```
+
+Where `myconfig.cfg` is your config file in the `pistorm` directory. If your config file is somewhere else you will need to put the full path for it there.
+
+**NOTE:** do not put an '=' between `--config-file` and the file name, this will not work.
+
+#### Different location
+
+You may want to run your PiStorm from a different location than `/home/pi/pistorm` this is fine, but it is important that the files that come with the emulator stay together in the same directory structure. For example, if you moved pistorm to `/opt/pistorm` you will need to change the following two lines:
+
+```ini
+ExecStart=/opt/pistorm/emulator
+WorkingDirectory=/opt/pistorm
+```
+
+It is important both lines are changed otherwise this can cause issues, particularly crashes.
+
+#### Startup order
 
-This script will start PiStorm *before* the network connections have started.
+If, for example, your PiStorm configuration depends on something like Samba running for PiScsi you will want to change the startup order so the PiStorm waits for that to run. In the `[Unit]` second add something like the following example:
+
+```ini
+After=network.target samba.service
+```
+
+Please see the systemd documentation for more informatino on this.
+
+### Applying changes
+
+If you have made any changes to the `pistorm.service` file *after* it has been copied over you will need to reload the systemd configuration for the changes to be seen. This can be done with:
+
+```bash
+sudo systemctl daemon-reload
+```
 
 ## Faster boot