Giter VIP home page Giter VIP logo

owncast-scripts's Introduction

Owncast Server Control Scripts

This repository contains scripts to conveniently start and stop the Owncast server on macOS and Linux platforms.

What does it do?

script is used to manage an Owncast server, ensuring that it is properly configured with the correct IP address and network interface, and that it is not already running before starting it. It also provides options to stop a running Owncast server and to change the IP address in a remote VPS configuration.

  1. It starts by defining some ANSI color codes for console output.

  2. It then determines the directory of the script and loads a configuration file (config.sh) from the same directory.

  3. The script checks if an Owncast server is already running. If it is, it asks the user if they want to stop the server. If the user chooses to stop the server, it kills the Owncast process and exits. If the user chooses not to stop the server, the script simply terminates.

  4. If the Owncast server is not running, the script proceeds to get information about the network connection. It asks the user to choose between Wi-Fi and Ethernet, and sets the interface_id variable accordingly.

  5. The script then checks if the chosen network interface exists. If it doesn't, it prints an error message and exits.

  6. The script then retrieves the local IP address of the chosen network interface.

  7. The script defines a function launch_owncast which does the following:

    • It checks if the local IP address matches the IP address in the configuration of a remote VPS (Virtual Private Server). If they match, it starts the Owncast server in the background, opens OBS (Open Broadcaster Software), and optionally starts a Trakt Discord Presence Python script. It then exits.

    • If the local IP address does not match the IP address in the VPS configuration, it asks the user if they want to proceed. If the user chooses to proceed, it changes the IP address in the VPS configuration to the local IP address, and then reruns the launch_owncast function. If the user chooses not to proceed, it prints an error message and exits.

  8. Finally, the script calls the launch_owncast function to start the Owncast server.

Prerequisites

  • Owncast server installed on your machine. You can find more information on how to install Owncast here.
  • A pre-configured Cloudflare Tunnel is required for optimal functionality. Installation instructions can be found here.
  • If you want to have shortcuts on your desktop with a nice icon, here and here are the icons that I use.

Installation

  1. Clone this repository to your local machine.

    git clone https://github.com/the-maty/owncast-server-scripts.git
  2. Create your config.sh file from example-config.sh .

Usage

Starting Owncast Server

To start the Owncast server including Cloudflare Tunnel, use the following command:

chmod 600 config.sh
chmod +x owncast-script.sh
./owncast-script.sh

Stopping Owncast Server

To gracefully stop the Owncast server, execute the following command:

chmod +x owncast-stop.sh
./owncast-stop.sh

Compatibility

These scripts are designed to work seamlessly on both macOS and Linux platforms.

  • macOS: Tested on macOS version 10.15 and later.
  • Linux: Successfully tested on Ubuntu 18.04 and later.

Feel free to use these scripts on your preferred operating system, ensuring a consistent experience across compatible environments.

## Contributing

owncast-scripts's People

Contributors

the-maty avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.