-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathautoshutdown.config.default
120 lines (107 loc) · 4.69 KB
/
autoshutdown.config.default
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
;
; Synology Autoshutdown configuration file
;
; Created by René (https://github.com/rfuehrer)
;
; Licensed to the Apache Software Foundation (ASF) under one
; or more contributor license agreements. See the NOTICE file
; distributed with this work for additional information
; regarding copyright ownership. The ASF licenses this file
; to you under the Apache License, Version 2.0 (the
; "License"); you may not use this file except in compliance
; with the License. You may obtain a copy of the License at
;
; http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing,
; software distributed under the License is distributed on an
; "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
; KIND, either express or implied. See the License for the
; specific language governing permissions and limitations
; under the License.
; host information
CHECKHOSTS=system1 systm2 system3
CHECKHOSTS_DEEPSLEEP=system2
; ACTIVE_STATUS: active status of this script (for manual deactivation)
ACTIVE_STATUS=1
; DEBUG_MODE: debug mode (outut of debug messages to stdout and log)
DEBUG_MODE=0
; MYNAME: cutsomizable hostname of executing NAS (used in notifications)
MYNAME=syno_autoshutdown
; IFTTT integration
IFTTT_KEY=
IFTTT_EVENT=
; USE_INTERACTIVE_COLOR: use color codes in interactive/console mode
USE_INTERACTIVE_COLOR=1
; COLOR_ERROR: color code for error classification
COLOR_ERROR=\033[0;31m
; COLOR_WARNING: color code for warning classification
COLOR_WARNING=\033[0;33m
; COLOR_INFO: color code for info classification
COLOR_INFO=\033[1;37m
; COLOR_DEBUG: color code for debug classification
COLOR_DEBUG=\033[1;30m
; COLOR_PID: color code for process id
COLOR_PID=\033[0;35m
; SLEEP_TIMER: wating time (loop) to check clients again
SLEEP_TIMER=60
; SLEEP_MAXLOOP: number of max loops
SLEEP_MAXLOOP=30
; GRACE_TIMER: start grace period after x loops
GRACE_TIMER=20
; LOGFILE_MAXLINES: limit log file to number of lines
LOGFILE_MAXLINES=1000000
; LOGFILE_CLEANUP_DAYS: clean log files older than x days
LOGFILE_CLEANUP_DAYS=3
; SHUTDOWN_BEEP: beep system loudspeaker if shutting down (0/1)
SHUTDOWN_BEEP=1
; SHUTDOWN_BEEP_COUNT: number of beeps at shutdown
SHUTDOWN_BEEP_COUNT=5
; GRACE_BEEP: beep system loudspeaker if in grace period (0/1)
GRACE_BEEP=1
; GRACE_BEEP_COUNT: number of beeps in grace period
GRACE_BEEP_COUNT=1
; NOTIFY_ON_GRACE_START: send notification on start of grace period
NOTIFY_ON_GRACE_START=1
; NOTIFY_ON_GRACE_EVERY: send notification in grace period
NOTIFY_ON_GRACE_EVERY=5
; NOTIFY_ON_SHUTDOWN: send notification on shutdown
NOTIFY_ON_SHUTDOWN=1
; NOTIFY_ON_LONGRUN_EVERY: send notification if system is running a long time
NOTIFY_ON_LONGRUN_EVERY=180
; NOTIFY_ON_STATUS_CHANGE: send niotification if status of connected system changes
NOTIFY_ON_STATUS_CHANGE=1
; Placeholders are:
;#VALID_MARKER_SYSTEMS_LIST#
;#MY_START_TIME#
;#MY_HOSTNAME#
;#MY_PRIMARY_IP#
;#RUNLOOP_COUNTER#
;#RUNLOOP_TIME#
;#RUNLOOP_TIME_HUMAN#
;#SYS_UPTIME_HUMAN#
; MESSAGE_SLEEP: notification message if system is shutting down
MESSAGE_SLEEP=System is shutting down now...
; MESSAGE_GRACE_START: notification message if grace periods starts
MESSAGE_GRACE_START=System is going to be shut down soon - warning phase started...
; MESSAGE_GRACE_EVERY: notification message while in grace period
MESSAGE_GRACE_EVERY=System is going to be shut down soon - running warning phase...
; MESSAGE_LONGRUN: notification message if system is running a long time
MESSAGE_LONGRUN=System is running #SYS_UPTIME_HUMAN# - valid?
; MESSAGE_STATUS_CHANGE_VAL: notification message if valid systems are found
MESSAGE_STATUS_CHANGE_VAL=Warning phase stopped - at least one valid system founf (#VALID_MARKER_SYSTEMS_LIST#)...
; MESSAGE_STATUS_CHANGE_INV: notification message if no valid systems are found
MESSAGE_STATUS_CHANGE_INV=Warning phase started - no valid system found...
; MESSAGE_LAST_SYSTEM_DEEPSLEEP: notification message if remaining system is possible in deep sleep mode
MESSAGE_LAST_SYSTEM_DEEPSLEEP=Remaining valid system seems to be in deep sleep mode. Continuing checks...
NETWORK_USAGE_INTERFACE=bond0
NETWORK_USAGE_INTERFACE_MIN_BYTES=1000
NETWORK_USAGE_INTERFACE_MAX_BYTES=5000
NETWORK_USAGE_INTERFACE_PROBES=10
NETWORK_USAGE_INTERFACE_PROBES_POSITIVE=7
; [LOGFILE_FILENAME] define log filename; placeholder optionally (#DATETIME#) (value: $)
LOGFILE_FILENAME=autoshutdown_#DATE#-#TIME#-#PID#.log
; [CHECKHOSTS_IGNORE_MULTI_HOSTNAMES] if set ignore all names except the first one (valaue: 0/1)
CHECKHOSTS_IGNORE_MULTI_HOSTNAMES=1
; [SCRIPT_DEV_FILENAME] define script filename for edited version (copies from this file to running script at start of loop; prevents text file busy errors) (value: $)
SCRIPT_DEV_FILENAME=autoshutdown.sh.txt