-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
126 additions
and
70 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# This file is part of the zoomrs project: https://github.com/parmaster/zoomrs | ||
|
||
# get current user name | ||
USER=$(shell whoami) | ||
# get current user group | ||
GROUP=$(shell id -gn) | ||
|
||
run: | ||
./zoomrs | ||
|
||
status: | ||
sudo systemctl status zoomrs.service | ||
|
||
stop: | ||
sudo systemctl stop zoomrs.service | ||
|
||
start: | ||
sudo systemctl start zoomrs.service | ||
|
||
deploy: | ||
sudo systemctl stop zoomrs.service || true | ||
sudo cp zoomrs /usr/bin/ | ||
sudo chown $(USER):$(GROUP) /usr/bin/zoomrs | ||
sed -i "s/%USER%/$(USER)/g" zoomrs.service | ||
sudo cp zoomrs.service /etc/systemd/system/ | ||
sudo mkdir -p /etc/zoomrs | ||
sudo chown $(USER):$(GROUP) /etc/zoomrs | ||
cp config.yml /etc/zoomrs/ | ||
sudo systemctl daemon-reload | ||
sudo systemctl enable zoomrs.service | ||
sudo systemctl start zoomrs.service | ||
|
||
cli: | ||
./zoomrs-cli --config ./config_cli.yml | ||
|
||
.PHONY: build buildsvc dbg test run info status deploy start stop cli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Zoomrs - Zoom meetings recordings download service | ||
|
||
### This is a binary distribution of Zoomrs project, a very brief description follows. For more information please refer to the [README](https://github.com/parmaster/zoomrs#readme) in main repository. | ||
|
||
## Configuration | ||
Example self-documented configuration file `config.yml` included. | ||
|
||
## Running the service | ||
|
||
### Foreground mode | ||
Plain and simple `./zoomrs` should load a default `config.yml` file and launch if everything is configured correctly: | ||
|
||
./zoomrs | ||
|
||
or specify config file and debug mode: | ||
|
||
./zoomrs --config custom_config.yml --dbg | ||
|
||
To stop the service press `Ctrl+C` (or send `SIGINT`, `SIGTERM` signal to the process) | ||
|
||
### Systemd service | ||
1. Configure the service and make sure it runs in foreground mode (see above). | ||
2. Run `make deploy` to build the binary and copy everything where it belongs (see `Makefile` and `zoomrs.service` for details), enable and run the service | ||
|
||
make deploy | ||
|
||
3. Run `make status` to check the status of the service | ||
|
||
make status | ||
|
||
Log files are located at `/var/log/zoomrs.log` and `/var/log/zoomrs.err` by default. | ||
|
||
### CLI Tool | ||
CLI tool command example: | ||
|
||
./zoomrs-cli --cmd check --config config.yml | ||
|
||
Refer to the [README](https://github.com/parmaster/zoomrs#readme) in main repository to learn more about the CLI tool and its commands. | ||
|
||
## Responsibility | ||
The author of this project is not responsible for any damage caused by the use of this software. Use it at your own risk. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash | ||
|
||
# Define the arrays of OS and architecture | ||
os=("linux" "darwin" "windows") | ||
arch=("amd64" "arm64") | ||
|
||
# Define the ignore list | ||
ignore=("windows/arm64") | ||
|
||
# apps is a map of app name to the source directory | ||
declare -A apps | ||
apps["zoomrs"]="../cmd/service" | ||
apps["zoomrs-cli"]="../cmd/cli" | ||
|
||
# version is passed in as an argument | ||
version=$1 | ||
|
||
# Loop through the OS and architecture arrays | ||
for o in "${os[@]}"; do | ||
for a in "${arch[@]}"; do | ||
# Check if the current combination is in the ignore list | ||
combination="$o/$a" | ||
if [[ " ${ignore[*]} " == *" $combination "* ]]; then | ||
echo "Ignoring $combination" | ||
else | ||
# Build the application for the current combination | ||
for app in "${!apps[@]}"; do | ||
source="${apps[$app]}" | ||
out_dir="release/zoomrs_${o}_${a}_${version}" | ||
mkdir -p $out_dir | ||
echo "Building $app for $combination into $out_dir" | ||
if [ "$o" == "windows" ]; then | ||
app="$app.exe" | ||
fi | ||
GOOS="$o" GOARCH="$a" go build -o "$out_dir/$app" "$source" | ||
done | ||
cp ./README.md "$out_dir/" | ||
cp ../LICENSE "$out_dir/" | ||
cp ./Makefile "$out_dir/" | ||
cp ./config.yml "$out_dir/" | ||
cp ./zoomrs.service "$out_dir/" | ||
tar -czvf "$out_dir.tar.gz" -C "$out_dir" . | ||
rm -rf "$out_dir" | ||
fi | ||
done | ||
done |