Commit graph

212 commits

Author SHA1 Message Date
Henric Andersson
acb8cc2fb8 Use of AUTOINSTALL/AUTOSTART when not root is an error
So we should actually fail early instead of continuing
2017-02-16 19:50:10 -08:00
Henric Andersson
59995961bb Add the capability to check for update ONLY 2017-02-16 19:49:06 -08:00
Alex Malinovich
869bb59b35 Check if users want to be notified of updates in installer.sh 2017-02-16 19:37:12 -08:00
Henric Andersson
9b0ec5de9d Make auto update more forgiving
plexupdate.sh should not fail because autoupdate cannot proceed.
2017-02-16 19:32:52 -08:00
Henric Andersson
6093805856 Accidentially changed default behavior
PUBLIC should be no again

Fixes 167
2017-02-16 19:29:53 -08:00
Henric Andersson
b487489aca Changes cron behavior to report when new version was installed (#165)
It's now possible to get an exit code when an update is found/installed.
2017-02-16 19:16:52 -08:00
Henric Andersson
a38f8496cb Don't emit token error unless email/pass is empty 2017-02-15 08:50:49 -08:00
Henric Andersson
0ad1928df6 Add helpful info when install fails 2017-02-15 08:47:25 -08:00
Henric Andersson
4c5669e35f Merge pull request #164 from mrworf/snown-stored-token-auth
Use stored token from Plex
2017-02-15 08:32:05 -08:00
Henric Andersson
f42e4b4f22 Fixed issue where assumptions were made about plex installation
Token file isn't necessarily defined by user nor is it installed in
user's home directory. This allows us to specify additional locations
to find the preference where the token hides.
2017-02-15 08:37:30 -08:00
Henric Andersson
8aaf6b2db7 Messed up the IF statements when fixing issue 2017-02-15 08:10:48 -08:00
Henric Andersson
0e28f1bbe7 Merge branch 'master' into stored-token-auth 2017-02-15 08:08:35 -08:00
Henric Andersson
96eb62b467 Warn users who forget to set PUBLIC=no
Even if you define email and password, the public version is still
downloaded unless PUBLIC=no

This change warns the user about this behavior since it's most likely
not intended.
2017-02-14 13:12:26 -08:00
Henric Andersson
2e26cd3dcc Added some helpful messages when plex.tv has an issue
We now tell the user to try plex.tv first if we were able to
get the release info but it lacks a functional link.
2017-02-02 12:44:24 -08:00
Logan Holmes
b52ce9178f Fall back on server token 2017-01-13 16:09:41 -08:00
Alex Malinovich
fdc24ff187 Improve security of config files (#153) 2016-12-19 21:41:38 -08:00
Henric Andersson
440de0cfe5 Deprecated exit code 5 and corrcted cronwrapper and enhanced README (#148)
* Deprecated exit code 5 and corrcted cronwrapper and enhanced README

- plexupdate.sh will consider no new version as success
- cronwrapper will not print anything unless it truly fails
- README.md updated to provide more details about .plexupdate

* Moved text from README.md to wiki and added notifyonreturn to cron

* Removed overthought part
2016-12-11 15:10:23 -08:00
Alex Malinovich
044ff5f132 Update deprecation message to be more useful (#147)
* Update deprecation message to be more useful
2016-12-10 15:05:02 -08:00
Alex Malinovich
7d24834d24 Run wget with -q when installing (#146) 2016-12-09 22:23:33 -08:00
Alex Malinovich
88a759a79c Installer script and cleanup
* Stop users from saving config with invalid download directory
* Added additional sanity for email checking
* Add installer script
* Update cronwrapper to work with installer script
* Add AUTOUPDATE to default config
* Read /etc/plexupdate.conf before other configs, if available
* Use dnf on newer redhat systems
* Only use plexupdate.conf or --config
* Give existing users explaination as to why plexupdate.sh failed
* Removed references to .plexupdate
* Warn users that .plexupdate is going away
* Offer to import settings in ~/.plexupdate.conf in installer (if they exist)
* Only show AUTOSTART warning if AUTOINSTALL is enabled
* Change default download directory to /tmp
* Warn users to run the installer as sudo
* Remove VAR_CL logic in favor of checking config before getopt run
* Use sha1sum for version check and auto-fix git permissions on exit
* Skip update check if AUTOUPDATE is enabled
* Fix permissions for all files, not just .git
* Don't enable -P in installer if we know it won't work
2016-12-09 22:00:48 -08:00
Alex Malinovich
760ad2b564 Fixes for cronwrapper behavior (#138)
* Fix cronwrapper failing if CONF is specified

* Exit code 0 means an update was applied, so we should send output

* Make sure wget log gets cleaned up along with other temp files

* Fix cronwrapper showing unwanted output even while logging
2016-12-09 22:00:48 -08:00
Henric Andersson
5c48315fa4 More error checking and documentation 2016-12-09 22:00:48 -08:00
Henric Andersson
12024f7581 Fixed various minor issues and spelling 2016-12-09 22:00:47 -08:00
Henric Andersson
2235bdd57f Fixed wiki link 2016-12-09 22:00:47 -08:00
Henric Andersson
7a24d162d5 Removed last pieces of quiet 2016-12-09 22:00:47 -08:00
Henric Andersson
d97df36de3 Initial commit after cleaning up log 2016-12-09 22:00:47 -08:00
Henric Andersson
fa7ef1da94 Relaxed email address check
Will only complain if you provide a malformed email address.

Fixes #141
2016-11-28 19:57:44 -08:00
Henric Andersson
446fe0ba3e Added additional sanity for email checking 2016-11-19 10:07:40 -08:00
Henric Andersson
7e11b392f7 Now properly detects missing email/pass and adds debug feature
By adding -v to the options, the tool prints out the email and
password used to authenticate, just-in-case.
2016-11-19 09:58:29 -08:00
Henric Andersson
1b98ed62f1 Wrong function 2016-11-16 22:22:21 -08:00
Henric Andersson
c122a14261 Stop users from saving config with invalid download directory 2016-11-16 22:21:24 -08:00
Henric Andersson
cb30231fac Check if wget fails due to unsupported options
--show-progress will not stop plexupdate.sh but it will tell you
it didn't like it very much. You need wget 1.16+ for that to work.

Fixes #123
2016-11-10 17:20:06 -08:00
Henric Andersson
7bc0039328 Added version checking to help non-git users
CHECKUPDATE=yes (the default) will now alert you if there is a new
version available of this tool.

Solves #135
2016-11-10 17:00:17 -08:00
Henric Andersson
9708bd9f3e Show more meaningful error for downloaddir
Now tells you what it tried
2016-11-10 16:31:06 -08:00
Henric Andersson
21e678c790 Show what config is being used to avoid confusion 2016-11-10 16:27:51 -08:00
Jon
08b5a74e51 Update readme (#134) 2016-11-04 13:48:22 -07:00
Jon
a94fda2265 More missing quotes (#133) 2016-11-04 13:47:29 -07:00
Jon
a0cab09509 Correct Cron logging (#132) 2016-11-04 11:03:04 -07:00
Jon
2a591e8840 Add missing quotes (#127) 2016-10-27 21:33:32 -07:00
Jon
c8b6d0a7b3 Add port variable (#125) 2016-10-27 21:33:12 -07:00
Jon
da8ff2f4bc Add progress bar if requested (#121) 2016-10-20 12:11:03 -07:00
Jon
d9253e1939 Improve logging functionality (#120) 2016-10-20 09:19:55 -07:00
Jon
4c3bca05e5 Fix for no arguments causing error (#119) 2016-10-12 19:51:53 -07:00
Jon
6b8b40eb7a Fix for Issue #116 (#117) 2016-10-11 18:44:40 -07:00
Jon
d51ed35a81 Argument changes (#106)
* Standardize tabs

* Change options to be robust

* Fix typos in usage

* Only trim first and last single quotes

* Remove unnecessary variable

* Give error message on old style config, but don't break
2016-10-08 19:05:01 -07:00
Andreas Paul
06ce11511a fix git dependency package and typo (#113)
git-all installs _all_ git subpackages, which includes amongst other
packages apache and cvs, which is complete overkill.

The `git` package installs the git main components with minimal
dependencies, which should be sufficient.
2016-10-01 06:43:53 -07:00
Jon
5747ef78cb Convert tmp files to mktemp (#110)
* Convert tmp files to mktemp

* Prepend variables with FILE_

* Rename SHAFILE
2016-09-29 21:25:07 -07:00
Henric Andersson
32828572a7 Merge pull request #108 from mscreations/checksum-fix
Make sure that the emitted sha file gets cleaned up
2016-09-29 08:58:44 -07:00
Jon Shaulis
c4a2ee4480 Do not depend on filename var 2016-09-29 10:15:09 -04:00
Jon Shaulis
256ece32f3 Move sha checksum file to tmp dir 2016-09-28 19:48:04 -04:00