vars
This commit is contained in:
parent
4d98850643
commit
042ac1ff71
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1,3 @@
|
||||
mailvars
|
||||
vars
|
||||
process.log
|
||||
uploadpage/streams/*
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
systems: `apt install git php-fpm ffmpeg`).
|
||||
* Clone repo: `git clone https://gitlab.com/pepa65/streamupload`.
|
||||
* `cd streamupload`. Now the output of `pwd` is the value for `$repopath`.
|
||||
* Copy `_mailvars` to `mailvars` and set the variables
|
||||
* Copy `_vars` to `vars` and set the variables
|
||||
`to`, `user`, `password`, `smtp` and `port` in it in order to
|
||||
receive mail notifications when the encodes are finished.
|
||||
* Make a crontab-entry: "* * * * * $repopath/encode" (replace `$repopath`!).
|
||||
|
||||
@ -1,6 +0,0 @@
|
||||
# Variables for mailer
|
||||
to=''
|
||||
user=''
|
||||
password=''
|
||||
smtp=''
|
||||
port=''
|
||||
23
_vars
Normal file
23
_vars
Normal file
@ -0,0 +1,23 @@
|
||||
## Variables for the install script
|
||||
# All have to be filled in, except if they have a default
|
||||
|
||||
# Interface for serving the page: ':80' or 'domain.name'
|
||||
# Defaults to ':80'
|
||||
interface=''
|
||||
|
||||
# Timezone for local user
|
||||
tz='UTC'
|
||||
|
||||
# Usersnames/passwords (multiple pairs allowed)
|
||||
# Defaults to none (no authentication required)
|
||||
declare -A userpw
|
||||
userpw['password1']='xxxxxxxxxx'
|
||||
|
||||
# Variables for mailer
|
||||
to='(recipient of notifications)'
|
||||
user='(smtp login)'
|
||||
password='(smtp password)'
|
||||
# Defaults to 'mail.gmail.com'
|
||||
smtp=''
|
||||
# Defaults to: '587'
|
||||
port=''
|
||||
3
encode
3
encode
@ -18,10 +18,11 @@ Log(){ # 1:message 2:returncode(empty: no exit) I:file
|
||||
}
|
||||
|
||||
Mail(){ # 1:kind(0:done, 1:wrong type, 2:encoding error) 2:logline I:repopath,email,name,type,start,finish
|
||||
source "$repopath/mailvars" # I:to,user,password,smtp,port
|
||||
source "$repopath/vars" # I:to,user,password,smtp,port
|
||||
local sbj msg from="Stream Upload server"
|
||||
# Strip the '_' if email set
|
||||
[[ $email ]] && to=${email:1}
|
||||
[[ $port ]] || port=587
|
||||
sbj[0]="Stream Upload encoding done for ${name##*@}"
|
||||
sbj[1]="Stream Upload file wrong type: $type"
|
||||
sbj[2]="Stream Upload error encoding"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user