Compare commits
2 Commits
69c2148294
...
f56e70f784
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f56e70f784 | ||
|
|
7509d13931 |
@ -19,18 +19,18 @@ Before using the script, you need to set the following configuration variables:
|
|||||||
|
|
||||||
- `MESSAGE`: The content of the notification you want to send.
|
- `MESSAGE`: The content of the notification you want to send.
|
||||||
|
|
||||||
- `LOG_FILE`: The file where the logs will be stored. The default is `gotify_notifications.log`.
|
- `LOG_FILE`: The file where the logs will be stored. The default is `gotifyer.log`.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
1. Clone or download the script to your local machine.
|
1. Clone or download the script to your local machine.
|
||||||
2. Open the script in a text editor and replace the configuration variables with your own values.
|
2. Open the script in a text editor and replace the configuration variables with your own values.
|
||||||
3. Make the script executable:
|
3. Make the script executable:
|
||||||
```bash
|
```bash
|
||||||
chmod +x gotify_notification.sh
|
chmod +x gotifyer.sh
|
||||||
```
|
```
|
||||||
4. Run the script:
|
4. Run the script:
|
||||||
```bash
|
```bash
|
||||||
./gotify_notification.sh
|
./gotifyer.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
## How It Works
|
## How It Works
|
||||||
|
|||||||
@ -8,7 +8,7 @@ MESSAGE="<YOUR_MESSAGE>"
|
|||||||
HOSTNAME=$(hostname) # Get the hostname of the machine
|
HOSTNAME=$(hostname) # Get the hostname of the machine
|
||||||
TITLE="$HOSTNAME - $MESSAGE_TITLE" # Title with hostname prefixing the message
|
TITLE="$HOSTNAME - $MESSAGE_TITLE" # Title with hostname prefixing the message
|
||||||
PRIORITY=5 # Notification priority (1-5)
|
PRIORITY=5 # Notification priority (1-5)
|
||||||
LOG_FILE="gotify_notifications.log"
|
LOG_FILE="gotifyer.log"
|
||||||
|
|
||||||
# Function to log messages
|
# Function to log messages
|
||||||
log_message() {
|
log_message() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user