mirror of
https://github.com/SinTan1729/ReVancedBuilder.git
synced 2024-12-26 20:58:37 -06:00
docs: Add information about systemd timers in README
This commit is contained in:
parent
cbafa597fc
commit
fe0ed0a4a8
1 changed files with 40 additions and 7 deletions
41
README.md
41
README.md
|
@ -2,10 +2,43 @@
|
||||||
This repo will allow one to build [ReVanced](https://github.com/revanced/) apps automatically and post it to a telegram channel to access and possibly share the builds with friends. It uses [Gotify](https://gotify.net), [ntfy.sh](https://ntfy.sh) or [telegram.sh](https://github.com/fabianonline/telegram.sh) to send messages and [telegram-upload](https://github.com/Nekmo/telegram-upload) to upload files (optionally, disabled out by default). Make sure that `Java >=17` is installed and selected as default.
|
This repo will allow one to build [ReVanced](https://github.com/revanced/) apps automatically and post it to a telegram channel to access and possibly share the builds with friends. It uses [Gotify](https://gotify.net), [ntfy.sh](https://ntfy.sh) or [telegram.sh](https://github.com/fabianonline/telegram.sh) to send messages and [telegram-upload](https://github.com/Nekmo/telegram-upload) to upload files (optionally, disabled out by default). Make sure that `Java >=17` is installed and selected as default.
|
||||||
|
|
||||||
## How to use
|
## How to use
|
||||||
Just run `./build_revanced <working-directory> (force/clean/experimental/checkonly/buildonly)`. Might be a good idea to set it up to run periodically using cron. I currently use the following in a user crontab to run it everyday at 6 AM:
|
Just run `./build_revanced <working-directory> (force/clean/experimental/checkonly/buildonly)`. Might be a good idea to set it up to run periodically. There are a few ways of doing it.
|
||||||
```
|
1. Just drop it inside `/etc/cron.daily/`.
|
||||||
0 6 * * * <full-script-location> <full-working-directory-location>
|
1. To make it run at a specific time (6AM in the example) using `cron`, put this in your `crontab`:
|
||||||
```
|
```crontab
|
||||||
|
0 6 * * * <full-script-location> <full-working-directory-location>
|
||||||
|
```
|
||||||
|
1. The exact same thing as in 2 can be achieved using `systemd` timers instead. Create the following files.
|
||||||
|
```toml
|
||||||
|
/etc/systemd/system/revanced-builder.service
|
||||||
|
---------------------------------------------
|
||||||
|
[Unit]
|
||||||
|
Description=Automatically build new builds of ReVanced
|
||||||
|
Wants=network-online.target
|
||||||
|
After=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
User=<user>
|
||||||
|
Group=<group>
|
||||||
|
ExecStart=_JAVA_OPTIONS='-Xmx512m' <full-script-location> <full-working-directory-location>
|
||||||
|
```
|
||||||
|
```toml
|
||||||
|
/etc/systemd/system/revanced-builder.timer
|
||||||
|
-------------------------------------------
|
||||||
|
[Unit]
|
||||||
|
Description=Automatically build new builds of ReVanced
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=*-*-* 6:00:00
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
||||||
|
```
|
||||||
|
and then enable the timer using
|
||||||
|
```bash
|
||||||
|
sudo systemctl enable --now revanced-builder.timer
|
||||||
|
```
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
- The following programs are needed to run this script. Make sure that you have them in your `$PATH`.
|
- The following programs are needed to run this script. Make sure that you have them in your `$PATH`.
|
||||||
|
|
Loading…
Reference in a new issue