Skip to content

Commit

Permalink
apollo space junk as a startup service
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesreid1 committed May 16, 2020
1 parent 4fb4795 commit fc76d80
Showing 1 changed file with 43 additions and 1 deletion.
44 changes: 43 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ bot/
```


## Running The Bot Flock
## Running the Bot Flock

(Note: take care of `apikeys.json` before you begin.)

Expand All @@ -115,3 +115,45 @@ $ cd bot/
$ python ApolloBotFlock.py
```

## Running the Bot Flock as a Service

This repo contains a `service/` directory that contains
a template for a `*.service` file, which can be used to
run the bot as a startup service in Linux.

To create the real service script from the template service
script, run `apply_templates.py` after setting the following
environment variables:

* `APOLLO_PATH`
* `APOLLO_USER`

This will set the path to the apollo space junk repository
and the user to run the bot as, respectively.

Finally, install the service by copying the `.service` file
that was created to `/etc/systemd/system/`.

Finally, enable the service (called `apollo`):

```
$ sudo service apollo enable
```

Then start it:

```
$ sudo service apollo start
```

To stop it:

```
$ sudo service apollo stop
```

To disable the startup service:

```
$ sudo service apollo disable
```

0 comments on commit fc76d80

Please sign in to comment.