|
1 | 1 | #!/bin/bash |
2 | 2 | # Automatically check jw.org inbox for new messages |
3 | 3 | # In popular Linux distros (e.g. Ubuntu) all of the programs here come pre-installed. (Except maybe your favorite browser.) |
| 4 | +# These may include: wget, notify-send, gpg, mplayer|aplay, firefox|google-chrome|? |
4 | 5 | # You may check stderr if one of those programs aren't installed |
5 | 6 |
|
6 | 7 | # Check for multiple sessions of script |
|
10 | 11 | cd "`dirname $0`" |
11 | 12 |
|
12 | 13 | # jw.org account details |
| 14 | +# (Option 1 - plaintext passwords) |
13 | 15 | username='' |
14 | 16 | password='' |
15 | 17 |
|
| 18 | +# Authentication (modification optional, see below) |
| 19 | +auth="txtUserName=$username&txtPassword=$password" |
| 20 | + |
| 21 | +# (Option 2 - encrypted username and password) |
| 22 | +# If you prefer a password in an encrypted file, encrypt username and password in this format: |
| 23 | +# txtUserName=$username&txtPassword=$password |
| 24 | +# i.e. `echo "txtUserName=$username&txtPassword=$password" | gpg -c - > .encrypted-file` |
| 25 | +# You may wish to store this file separated from the script directory and do a `chmod 600` |
| 26 | +# Store auth as below: |
| 27 | + |
| 28 | +# auth=`gpg --batch -q --no-use-agent --passphrase-file /path/to/passphrase -d ./encrypted-file` |
| 29 | + |
16 | 30 | # Unique account number |
17 | 31 | # This is the unique alphanumeric code for your account. It is REQUIRED that you fill this in correctly. |
18 | 32 | # First login to your account in a browser and see the URL in the format: https://www.jw.org/apps/<LANG>_<txtAcct>_<PAGE> |
19 | 33 | # For example, you may see in the address bar immediately after you logged in: https://www.jw.org/apps/E_1234567890_ADMIN |
20 | 34 | # Then your txtAcct would be: 1234567890 |
21 | 35 | txtAcct='' |
22 | 36 |
|
23 | | -# Authentication (modification optional) |
24 | | -auth="txtUserName=$username&txtPassword=$password" |
25 | | -# If you prefer a password in an encrypted file separate from the script, for example: (the encrypted-file format should be the same above) |
26 | | -# auth=`gpg --batch -q --no-use-agent --passphrase-file /path/to/passphrase -d ./encrypted-file` |
27 | | - |
28 | 37 | # Time to check jw.org inbox, could be: second, minute, hour, day: s m h d |
29 | 38 | checkevery=3h |
30 | 39 |
|
|
0 commit comments