We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38bd2d5 commit 01a38dbCopy full SHA for 01a38db
files/backup/evcc_container_backup.sh
@@ -118,3 +118,26 @@ restore() {
118
119
log_message "Restore successful" low
120
}
121
+
122
+# Check if the script is being run as a standalone script
123
+if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
124
+ # Check the first argument to determine the action
125
+ case "$1" in
126
+ before)
127
+ before
128
+ ;;
129
+ success)
130
+ success
131
132
+ failure)
133
+ failure
134
135
+ restore)
136
+ restore
137
138
+ *)
139
+ echo "Usage: $0 {before|success|failure|restore}"
140
+ exit 1
141
142
+ esac
143
+fi
0 commit comments