Compare commits

...

222 Commits
1.1.8 ... 1.5.5

Author SHA1 Message Date
RustDesk
9cb3f06f5a Update SLA.md 2025-02-12 18:58:35 +08:00
RustDesk
84eabfd088 Create SLA.md 2025-02-12 18:57:38 +08:00
RustDesk
5f4e47055d Update terms 2024-11-22 15:01:44 +08:00
RustDesk
e478d266b0 Update install.sh 2024-11-07 08:59:17 +08:00
RustDesk
5bb76c2e9d Update update.sh 2024-08-18 22:15:27 +08:00
RustDesk
5696f381c8 Update install.sh 2024-08-18 22:14:06 +08:00
RustDesk
2e0388ec0c Update update.sh 2024-08-18 21:40:47 +08:00
RustDesk
40855c65a3 Update install.sh 2024-08-18 21:37:23 +08:00
RustDesk
4f46a53c77 Update install.sh 2024-08-18 21:35:12 +08:00
RustDesk
43a8b5ce1a Merge pull request #262 from dinger1986/main
Update install.sh
2024-05-31 23:47:37 +08:00
dinger1986
724593a77b Update update.sh 2024-05-31 15:48:38 +01:00
dinger1986
6a9a726a65 Update install.sh 2024-05-31 15:34:25 +01:00
RustDesk
87cb900da8 Delete backup.sh 2024-05-26 10:05:02 +08:00
RustDesk
ef0785c03d Delete restore.sh 2024-05-26 10:04:52 +08:00
RustDesk
c7ac7a628c Merge pull request #163 from 21pages/uninstall
uninstall /etc/nginx/conf.d/rustdesk.conf
2023-11-28 10:17:36 +08:00
21pages
33ff465148 uninstall /etc/nginx/conf.d/rustdesk.conf
Signed-off-by: 21pages <pages21@163.com>
2023-11-28 09:08:55 +08:00
RustDesk
e0138ceb39 Merge pull request #161 from 21pages/main
use conf.d if sites-available and sites-enabled don't exist
2023-11-27 17:33:57 +08:00
21pages
39a769db72 use conf.d if sites-available and sites-enabled don't exist
Signed-off-by: 21pages <pages21@163.com>
2023-11-26 21:41:53 -05:00
RustDesk
29daee0608 Merge pull request #128 from enoch85/patch-1
correct typo in README
2023-10-08 11:57:54 +08:00
Daniel Hansson
7deca136ed correct typo in README 2023-10-07 18:50:45 +02:00
RustDesk
88d6186186 Merge pull request #127 from enoch85/patch-1
Address comment
2023-10-07 18:16:32 +08:00
Daniel Hansson
c840209d2d Address comment
https://github.com/rustdesk/rustdesk-server-pro/pull/109#issuecomment-1751652511

And that the uninstaller rebuilds the boot image is standard behavior, nothing dangerous.
2023-10-07 11:24:01 +02:00
RustDesk
c87d313027 Merge pull request #125 from enoch85/patch-6
change wording and layout of the uninstall menu
2023-10-06 19:42:48 +08:00
Daniel Hansson
fc76bec06b change wording and layout of the menu 2023-10-06 12:22:50 +02:00
RustDesk
14e66ba91e Merge pull request #124 from enoch85/patch-7
correct bug in lib.sh
2023-10-06 17:01:48 +08:00
Daniel Hansson
c45bf07cff correct bug in lib.sh
Sorry, should have noticed that directly

@rustdesk
2023-10-06 11:00:51 +02:00
RustDesk
9408e3628f Update README.md 2023-10-06 17:00:06 +08:00
RustDesk
34522ae7ba Merge pull request #123 from enoch85/patch-6
Improve README
2023-10-06 16:57:10 +08:00
Daniel Hansson
d86b4bd7cd Improve README
cc @rustdesk
2023-10-06 10:53:46 +02:00
RustDesk
afe85342c9 Merge pull request #122 from enoch85/patch-6
another small bug in lib
2023-10-06 16:38:27 +08:00
Daniel Hansson
a03b9c88cb another small bug in lib 2023-10-06 10:37:11 +02:00
RustDesk
aa8a1be443 Merge pull request #119 from enoch85/patch-2
correct copy paste mistake
2023-10-06 16:31:11 +08:00
RustDesk
f520f41890 Merge pull request #118 from enoch85/patch-1
do a safer migration
2023-10-06 16:30:29 +08:00
Daniel Hansson
66e8be4176 be extra careful 2023-10-06 08:18:28 +02:00
Daniel Hansson
b5801a9bfa Fix SC 2023-10-06 08:11:37 +02:00
Daniel Hansson
834c723ee2 correct copy paste mistake 2023-10-06 08:08:38 +02:00
Daniel Hansson
81f97d46e8 do a safer migration 2023-10-06 08:07:30 +02:00
RustDesk
5e45d44635 remove "rm default nginx file" 2023-10-06 12:25:23 +08:00
RustDesk
8bc783c20c remove "Remove the default Nginx configs" 2023-10-06 12:18:34 +08:00
RustDesk
3f86b8aa1f Merge pull request #115 from enoch85/patch-1
Consistency is key!
2023-10-06 12:16:35 +08:00
RustDesk
add84d65a0 Merge pull request #116 from enoch85/patch-2
Less duplicate code for convert script
2023-10-06 12:15:47 +08:00
Daniel Hansson
b3f3b6f3f3 some improvements 2023-10-05 19:14:42 +02:00
Daniel Hansson
b8d1618080 spelling 2023-10-05 19:04:58 +02:00
Daniel Hansson
a55613494d Less duplicate code for convert script 2023-10-05 19:03:09 +02:00
Daniel Hansson
afefb34850 move " to correct place 2023-10-05 15:52:35 +02:00
Daniel Hansson
b223b25d4d SC 2023-10-05 15:36:10 +02:00
Daniel Hansson
c0f5c1b6ba SC 2023-10-05 15:35:38 +02:00
Daniel Hansson
242f37d7b7 consistent in lib as well 2023-10-05 15:32:50 +02:00
Daniel Hansson
3aa88d0c12 details... 2023-10-05 15:20:38 +02:00
Daniel Hansson
e7b24d86eb minor changes to install 2023-10-05 15:20:07 +02:00
Daniel Hansson
a36ac3ba13 [WIP] Consistency is key!
This PR aims to make everything more consistent, and correct smaller errors/bugs.
2023-10-05 15:00:02 +02:00
RustDesk
53a6765771 Merge pull request #112 from enoch85/patch-1
Tune installation script
2023-10-05 14:23:41 +08:00
Daniel Hansson
240404a35f Merge branch 'main' into patch-1 2023-10-05 08:22:32 +02:00
RustDesk
6cf5b6f7ae Merge pull request #109 from enoch85/patch-2
Add uninstaller
2023-10-05 11:54:03 +08:00
Daniel Hansson
cc30226afd make SC happy 2023-10-04 20:27:37 +02:00
Daniel Hansson
c397a07425 if ! bind9 then bind 2023-10-04 20:23:48 +02:00
Daniel Hansson
8d07bc0c11 add -y flag
not sure about the other package managers.
2023-10-04 20:13:13 +02:00
Daniel Hansson
11420ebaf6 more improvements 2023-10-04 20:09:54 +02:00
Daniel Hansson
1053198d41 SC 2023-10-04 19:52:16 +02:00
Daniel Hansson
381558aedd do more with less 2023-10-04 19:46:53 +02:00
Daniel Hansson
af077524cc add support for more OSes 2023-10-04 19:34:50 +02:00
Daniel Hansson
bf6ab0af5f remove info 2023-10-04 19:18:02 +02:00
Daniel Hansson
a59e309333 SC 2023-10-04 19:16:43 +02:00
Daniel Hansson
2ceee1ca3d only get WAN IP if actually needed
avoid unnecessary traffic
2023-10-04 19:13:55 +02:00
Daniel Hansson
e802c03a47 install curl before anything else 2023-10-04 19:12:40 +02:00
Daniel Hansson
6da8204aab correct syntax for removing with pacman and yum 2023-10-04 18:27:13 +02:00
Daniel Hansson
7366541dce add root function to lib 2023-10-04 16:41:28 +02:00
Daniel Hansson
077e892e6d installation script tuning 2023-10-04 16:39:48 +02:00
Daniel Hansson
6ed4d38160 more generic title 2023-10-04 15:36:29 +02:00
Daniel Hansson
14b7019d21 add script name 2023-10-04 15:36:00 +02:00
Daniel Hansson
19623b0011 forgot to remove testing stuff 2023-10-04 15:07:41 +02:00
Daniel Hansson
0f95c5d8b4 final touches 2023-10-04 14:59:39 +02:00
Daniel Hansson
5929f8260e rename vars 2023-10-04 14:49:18 +02:00
Daniel Hansson
d992357a91 add missing var 2023-10-04 14:21:50 +02:00
Daniel Hansson
386e548d5c SC 2023-10-04 14:20:59 +02:00
Daniel Hansson
aecb8f28b3 Merge branch 'main' into patch-2 2023-10-04 14:17:22 +02:00
Daniel Hansson
f03fc83c4f more vars 2023-10-04 14:15:23 +02:00
Daniel Hansson
57862cb63f rethink the uninstaller 2023-10-04 14:11:41 +02:00
Daniel Hansson
dcd7f828c0 add more functions 2023-10-04 14:10:43 +02:00
RustDesk
ec79b3e832 Merge pull request #108 from enoch85/patch-1
Improve further
2023-10-04 13:41:59 +08:00
Daniel Hansson
bed5384ea4 Add uninstaller
This is based on the install script, line by line.

Will maybe make a nicer menu of everything if I have time and motivation.

This PR can be merged as is though.
2023-10-03 23:18:30 +02:00
Daniel Hansson
d12bc5f966 wording 2023-10-03 22:56:53 +02:00
Daniel Hansson
04369b60db add default user pass 2023-10-03 22:40:49 +02:00
Daniel Hansson
eaceefd8bb typo 2023-10-03 22:39:09 +02:00
Daniel Hansson
3f039cb502 intendent correctly 2023-10-03 22:36:15 +02:00
Daniel Hansson
efa485173f remove from main script 2023-10-03 22:26:20 +02:00
Daniel Hansson
23d9d936ad add more vars to lib 2023-10-03 22:25:55 +02:00
Daniel Hansson
50dcbccef9 Improve further
Fix https://github.com/rustdesk/rustdesk-server-pro/issues/107
2023-10-03 22:24:57 +02:00
RustDesk
b57eb8854d Merge pull request #96 from enoch85/patch-1
Use Snap instead for Certbot + fix Shellcheck, and improve code quailty
2023-10-04 00:54:20 +08:00
RustDesk
c2fa493407 Merge pull request #106 from enoch85/patch-5
enable shellcheck
2023-10-04 00:53:53 +08:00
RustDesk
37a2d95def Merge pull request #105 from enoch85/patch-4
enable shellcheck
2023-10-04 00:53:39 +08:00
RustDesk
5fd03c308a Merge pull request #104 from enoch85/patch-3
enable shellcheck
2023-10-04 00:53:25 +08:00
RustDesk
026a74e337 Merge pull request #103 from enoch85/patch-2
enable shellcheck
2023-10-04 00:53:10 +08:00
Daniel Hansson
3e760dc243 SC 2023-10-03 18:25:01 +02:00
Daniel Hansson
f8229c238b SC 2023-10-03 18:23:56 +02:00
Daniel Hansson
3daa02e45f enable shellcheck 2023-10-03 18:18:44 +02:00
Daniel Hansson
e474af4b6c enable shellcheck 2023-10-03 18:18:01 +02:00
Daniel Hansson
89b6a3df0a enable shellcheck 2023-10-03 18:17:30 +02:00
Daniel Hansson
101faddb97 enable shellcheck 2023-10-03 18:16:32 +02:00
Daniel Hansson
c7da348133 fix remaning stuff 2023-10-03 18:05:33 +02:00
Daniel Hansson
d7f477c190 found more permission occurances
...but now it's done
2023-10-03 16:16:59 +02:00
Daniel Hansson
80a378c75b ok, last last change :) 2023-10-03 16:10:52 +02:00
Daniel Hansson
f145a954c4 last change 2023-10-03 16:09:05 +02:00
Daniel Hansson
eba52bc614 SC fix? 2023-10-03 15:58:06 +02:00
Daniel Hansson
7d0d4e8238 Update lib.sh 2023-10-03 15:47:58 +02:00
Daniel Hansson
07b387f185 fixed wanip 2023-10-03 15:39:45 +02:00
Daniel Hansson
3d0472bb91 Merge branch 'rustdesk:main' into patch-1 2023-10-03 15:36:06 +02:00
Daniel Hansson
d00e5fa8d7 Update install.sh 2023-10-03 15:31:12 +02:00
Daniel Hansson
7c4a90f5df SC 2023-10-03 15:25:21 +02:00
Daniel Hansson
88906b6fae Update lib.sh 2023-10-03 15:23:37 +02:00
Daniel Hansson
e0a5c7a8ae starting to look like something shiny 2023-10-03 15:22:10 +02:00
Daniel Hansson
5495265cb1 Create lib.sh 2023-10-03 12:02:13 +02:00
Daniel Hansson
aebf0eff5d commit latest changes, still WIP 2023-10-03 11:59:09 +02:00
RustDesk
7aeb318587 fix https://github.com/rustdesk/rustdesk-server-pro/issues/100 2023-10-03 17:48:52 +08:00
RustDesk
659f2252fa Merge pull request #98 from enoch85/patch-2
Add shellcheck and misspell
2023-10-03 13:40:56 +08:00
Daniel Hansson
f1a4a25f56 remove non-existing branch 2023-10-02 17:12:10 +02:00
Daniel Hansson
dcbd9ab61f Add shellcheck and misspell 2023-10-02 17:10:49 +02:00
Daniel Hansson
97a4c12fa1 intendent properly 2023-10-02 14:53:47 +02:00
Daniel Hansson
4a70bb3540 fix a bunch or errors
1. Better EOF
2. Shellchecked the code
2023-10-02 12:57:33 +02:00
Daniel Hansson
f60fcb61e6 add classic confinment 2023-10-02 12:13:53 +02:00
Daniel Hansson
d3abe106c9 Use Snap instead for Certbot
It's much better, and newer, and updates automatically
2023-10-02 12:10:14 +02:00
RustDesk
30a9f19e82 Merge pull request #95 from dinger1986/main
updated update.sh
2023-10-01 21:24:08 +08:00
dinger1986
9134020d8e Merge branch 'rustdesk:main' into main 2023-10-01 11:39:26 +01:00
dinger1986
cb43f6f667 Update update.sh 2023-10-01 11:36:05 +01:00
RustDesk
95f403f9e2 Merge pull request #88 from dinger1986/main
added extras to nginx config
2023-09-28 10:27:39 +08:00
dinger1986
d48584cf3b Merge branch 'rustdesk:main' into main 2023-09-27 13:28:24 +01:00
dinger1986
38d91fbeeb Update convertfromos.sh 2023-09-27 13:28:10 +01:00
dinger1986
bdbe6e4bd0 Update install.sh 2023-09-27 13:27:38 +01:00
RustDesk
be3fab3a52 Merge pull request #79 from dinger1986/main
tweaking of backup and restore scripts
2023-09-21 11:32:36 +08:00
dinger1986
7ae3739716 Update restore.sh 2023-09-19 22:32:21 +01:00
dinger1986
707854675e Update backup.sh 2023-09-19 22:30:10 +01:00
RustDesk
d8f29f5aeb Merge pull request #72 from dinger1986/main
Added install for nginx etc
2023-09-14 01:26:35 +08:00
dinger1986
aabf85921e Update restore.sh 2023-09-11 10:17:40 +01:00
dinger1986
d7ad8d2f70 Update convertfromos.sh 2023-09-11 10:17:10 +01:00
dinger1986
be6b1e66a1 Update install.sh 2023-09-11 10:16:45 +01:00
RustDesk
abfd7c9ab1 Merge pull request #71 from dinger1986/main
added support for Almalinux and Rocky
2023-09-11 08:43:39 +08:00
dinger1986
a55e515e04 Update restore.sh 2023-09-10 20:17:30 +01:00
dinger1986
74ecae9fb3 Update convertfromos.sh 2023-09-10 20:16:59 +01:00
dinger1986
2e0edd77ef Update install.sh 2023-09-10 20:16:38 +01:00
RustDesk
7e178c4738 Merge pull request #63 from dinger1986/main
Updated restore script, wasnt done in time :)
2023-08-25 17:25:52 +08:00
dinger1986
2ade8b409d Merge branch 'rustdesk:main' into main 2023-08-25 10:12:49 +01:00
dinger1986
9ca9a54d10 Update restore.sh 2023-08-25 09:12:36 +01:00
RustDesk
72304f95bb Merge pull request #62 from dinger1986/main
changed variable for username, added backup and restore scripts and changed extension for tidying up files
2023-08-25 16:11:53 +08:00
dinger1986
cde1a2e77a Update backup.sh 2023-08-25 09:05:14 +01:00
dinger1986
b4ab33f25d Update restore.sh 2023-08-25 00:14:27 +01:00
dinger1986
50781866b9 Update convertfromos.sh 2023-08-25 00:10:53 +01:00
dinger1986
75b8f67d83 Create restore.sh 2023-08-25 00:10:29 +01:00
dinger1986
cce8bbbbee Update update.sh 2023-08-25 00:08:07 +01:00
dinger1986
a70cd79e36 Update install.sh 2023-08-25 00:07:39 +01:00
dinger1986
1c46003561 Update convertfromos.sh 2023-08-25 00:06:25 +01:00
dinger1986
2e0fe1ffd5 Update backup.sh 2023-08-25 00:04:46 +01:00
dinger1986
145c9a8e2f Update backup.sh 2023-08-25 00:01:42 +01:00
dinger1986
b6241ab778 Update backup.sh 2023-08-24 23:45:40 +01:00
dinger1986
f17b99e6cc Create backup.sh 2023-08-24 23:23:35 +01:00
RustDesk
2b4889f61c Merge pull request #52 from dinger1986/main
changed to tar.gz
2023-08-22 16:50:51 +08:00
dinger1986
53c97910c3 Merge branch 'rustdesk:main' into main 2023-08-22 09:49:38 +01:00
dinger1986
e7c54cc7fc Update convertfromos.sh 2023-08-22 09:49:21 +01:00
dinger1986
82736dbfc6 Update install.sh 2023-08-22 09:48:45 +01:00
dinger1986
1826725246 Update update.sh 2023-08-22 09:44:58 +01:00
dinger1986
d8a3b7340c Update update.sh 2023-08-22 09:40:04 +01:00
RustDesk
ab88536f56 Merge pull request #48 from dinger1986/main
Update terms
2023-08-17 10:15:59 +08:00
dinger1986
c6c6cc2949 Update terms 2023-08-16 18:09:10 +01:00
RustDesk
1cea6ac412 Merge pull request #46 from dinger1986/main
Update terms
2023-08-14 22:26:49 +08:00
dinger1986
6a7e38788a Update terms 2023-08-14 15:19:49 +01:00
RustDesk
e382b55c07 Merge pull request #45 from dinger1986/main
Update terms
2023-08-14 22:06:19 +08:00
dinger1986
11ef6f1c53 Update terms 2023-08-14 15:02:18 +01:00
RustDesk
90e75caf15 Create terms 2023-08-11 15:16:36 +08:00
RustDesk
0cac5eac77 Update README.md 2023-08-04 09:41:08 +08:00
RustDesk
d1e3867bad Delete LICENSE 2023-08-04 09:39:57 +08:00
RustDesk
d3dbe3b405 Merge pull request #38 from ednt/patch-1
Update update.sh
2023-08-02 22:32:56 +08:00
ednt
03e877da15 Update update.sh
Fix Faulty for debian
2023-08-01 18:11:12 +02:00
RustDesk
ff9ca9a034 Merge pull request #30 from dinger1986/main
Update update.sh
2023-07-21 21:56:24 +08:00
dinger1986
b7811b249c Update update.sh 2023-07-21 14:43:06 +01:00
RustDesk
ec52c2d089 Merge pull request #29 from dinger1986/main
fix additions stupidly put into the scripts, sorry
2023-07-21 20:24:17 +08:00
dinger1986
9f252d66a3 Update convertfromos.sh 2023-07-21 13:20:24 +01:00
dinger1986
4b93fd0ea5 Update install.sh 2023-07-21 13:20:07 +01:00
RustDesk
b315a73ecc Merge pull request #27 from dinger1986/main
small change to scripts
2023-07-20 16:42:18 +08:00
dinger1986
782a8082cd Update convertfromos.sh 2023-07-20 09:41:04 +01:00
dinger1986
58a030f9c2 Update update.sh 2023-07-20 09:40:48 +01:00
dinger1986
508ebf1916 Update install.sh 2023-07-20 09:40:25 +01:00
RustDesk
506c2d537d Merge pull request #22 from Mr-Update/patch-1
Small corrections
2023-07-19 15:26:14 +08:00
Mr-Update
8fa76603cd Update update.sh 2023-07-18 22:56:19 +02:00
Mr-Update
1f53613115 Update install.sh 2023-07-18 22:54:20 +02:00
Mr-Update
3081d85284 Update convertfromos.sh 2023-07-18 22:52:00 +02:00
Mr-Update
accdbeb1cd Update README.md 2023-07-18 22:48:27 +02:00
RustDesk
493ad90daf Merge pull request #5 from dinger1986/main
Added converter script and sudo in the right places and sort afew typos
2023-07-07 18:24:50 +08:00
dinger1986
e7bea98d65 Merge branch 'rustdesk:main' into main 2023-07-05 23:36:08 +01:00
dinger1986
1751711117 Delete install2.sh 2023-07-05 23:35:53 +01:00
dinger1986
3206736727 Create install2.sh 2023-07-05 23:14:57 +01:00
dinger1986
70ebaa2190 Update convertfromos.sh 2023-07-05 22:54:04 +01:00
dinger1986
8a2a09ea79 Update update.sh 2023-07-05 22:52:44 +01:00
dinger1986
6125cc59d1 Update install.sh 2023-07-05 22:52:08 +01:00
dinger1986
7890277f2c Update install.sh 2023-07-05 22:46:01 +01:00
dinger1986
0e5dc2724e Update convertfromos.sh 2023-07-05 22:45:12 +01:00
dinger1986
a61ef17ff2 Update install.sh 2023-07-05 09:22:32 +01:00
dinger1986
8c2d53977c Update install.sh 2023-07-05 09:21:48 +01:00
dinger1986
f0b18af2ff Update convertfromos.sh 2023-07-05 09:20:42 +01:00
dinger1986
2e4f4323c9 Update convertfromos.sh 2023-07-04 12:16:52 +01:00
dinger1986
783e1f8fcf Update update.sh 2023-07-04 12:11:18 +01:00
dinger1986
97b44c5f9d Update update.sh 2023-07-04 12:10:22 +01:00
dinger1986
e4f0fb2236 Create convertfromos.sh 2023-07-04 12:09:15 +01:00
dinger1986
6c7f24b739 Update install.sh 2023-07-04 12:08:02 +01:00
dinger1986
bb74be65a0 Update install.sh 2023-07-04 12:02:20 +01:00
dinger1986
eb7ce528af Update install.sh 2023-07-04 12:00:29 +01:00
RustDesk
ba95932c8a Merge pull request #4 from dinger1986/main
Changed for executables to be in /usr/bin
2023-07-04 17:59:36 +08:00
dinger1986
159aefa83e Update update.sh 2023-07-04 10:57:39 +01:00
dinger1986
d61200051e Update install.sh 2023-07-04 10:55:26 +01:00
RustDesk
3e9a27c640 Merge pull request #3 from dinger1986/main
Added in what the script does to the top of the install script
2023-07-04 17:16:18 +08:00
dinger1986
f5315bed82 Merge branch 'rustdesk:main' into main 2023-07-04 10:05:26 +01:00
dinger1986
ee40790852 Update install.sh 2023-07-04 10:05:05 +01:00
RustDesk
3252de441a Merge pull request #2 from dinger1986/main
changes made to be consistent with other service names and path
2023-07-04 16:53:17 +08:00
dinger1986
377e861281 Update update.sh 2023-07-04 09:50:44 +01:00
dinger1986
187b09e9f9 Update install.sh 2023-07-04 09:47:22 +01:00
RustDesk
b2f24ef398 Merge pull request #1 from dinger1986/main
added install script and edited readme
2023-07-04 09:59:43 +08:00
dinger1986
8fb1731ab5 Update update.sh 2023-07-03 23:20:57 +01:00
dinger1986
0340d1ecce Update install.sh 2023-07-03 23:17:26 +01:00
dinger1986
d5f4c17877 Create update.sh 2023-07-03 23:17:21 +01:00
dinger1986
b79c90af66 Update README.md 2023-07-03 22:59:54 +01:00
dinger1986
a21d3c1036 Update install.sh 2023-07-03 22:57:02 +01:00
dinger1986
3844f75d71 Update README.md 2023-07-03 22:34:45 +01:00
dinger1986
f8be31202f Update README.md 2023-07-03 22:34:21 +01:00
dinger1986
de9de4f69f Create install.sh 2023-07-03 22:20:16 +01:00
10 changed files with 1501 additions and 663 deletions

31
.github/workflows/reviewdog.yml vendored Normal file
View File

@@ -0,0 +1,31 @@
on:
pull_request:
push:
name: 'reviewdog'
jobs:
shellcheck:
name: Shellcheck testing
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: shellcheck
uses: reviewdog/action-shellcheck@v1
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
path: "." # Optional.
pattern: "*.sh" # Optional.
exclude: "./.git/*" # Optional.
misspell:
name: Check spelling
runs-on: ubuntu-latest
steps:
- name: spelling or typos
uses: actions/checkout@v4
- name: misspell
uses: reviewdog/action-misspell@v1
with:
github_token: ${{ secrets.github_token }}
locale: "US"

661
LICENSE
View File

@@ -1,661 +0,0 @@
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.

View File

@@ -1,2 +1,52 @@
# rustdesk-sever-pro
Some scripts for RustDesk Server Pro are hosted here.
# RustDesk Server PRO
Here we have a small collection of [some scripts](https://rustdesk.com/docs/en/self-host/rustdesk-server-pro/installscript/) for RustDesk Server Pro.
> If you are looking for the open source version please go to [RustDesk Server](https://github.com/rustdesk/rustdesk-server)
# Contributing to this repo
You are very welcome to add your PR to improve the current scripts. Some pointers:
### The lib file
The lib.sh is used to avoid duplicate code. Here we collect everything that occurs more than once in the varoius scripts. That could be both `functions()` and `$variables`.
### Indentation
We always use four (4) spaces, not one (1) tab. Please see below for examples.
### IF arguments and functions
The current style is to use it like this:
```
if something
then
do something
fi
```
Not like:
```
if something; then
do something
fi
```
Same applies for functions:
```
examplefuntion() {
if something
then
do something
fi
}
```
### Variables
Variables are always written in CAPITAL LETTERS.
```
EXAMPLEVARIABLE=true
```

60
SLA.md Normal file
View File

@@ -0,0 +1,60 @@
This Service Level Agreement (SLA) outlines the terms and conditions under which RustDesk provides email support to its customers. This SLA is designed to ensure a high level of service quality and customer satisfaction.
1. Scope of Support
RustDesk offers email support to assist customers with issues related to the installation, configuration, usage, and troubleshooting of RustDesk software. Support is available for the following:
- Technical issues and bugs
- Feature inquiries
- General usage questions
Exclusions:
- Custom development or scripting
- Third-party software or hardware issues
- Training or consulting services
2. Support Availability
Email support is available 24 hours a day, 7 days a week. However, responses will be provided during standard business hours (Monday to Friday, 9:00 AM to 6:00 PM GMT+7).
3. Response and Resolution Times
RustDesk is committed to providing timely responses and resolutions to customer inquiries. The following table outlines our target response and resolution times based on the severity of the issue:
| **Severity Level** | **Description** | **Initial Response Time** | **Target Resolution Time** |
|---------------------|---------------------------------------------------------------------------------|---------------------------|-----------------------------|
| **Critical** | System outage or major functionality failure impacting core operations. | 2 hours | 24 hours |
| **High** | Significant performance degradation or partial loss of functionality. | 4 hours | 48 hours |
| **Medium** | Minor issues or questions that do not significantly impact functionality. | 8 hours | 5 business days |
| **Low** | General inquiries, feature requests, or non-urgent questions. | 24 hours | 10 business days |
Note: Resolution times are estimates and may vary depending on the complexity of the issue. RustDesk will provide regular updates if additional time is required.
4. Customer Responsibilities
To ensure efficient support, customers are expected to:
Provide detailed descriptions of the issue, including error messages, screenshots, and steps to reproduce the problem.
Specify the RustDesk version, operating system, and any relevant configuration details.
Respond promptly to requests for additional information from the support team.
5. Escalation Process
If an issue is not resolved within the target resolution time or requires further attention, customers may escalate the issue by contacting the RustDesk support manager at zhou@rustdesk.com. Escalated issues will be prioritized and addressed by senior support staff.
6. Limitations
RustDesk does not guarantee resolution for all issues, particularly those caused by third-party software, hardware, or unsupported configurations.
Support is limited to the current and immediately previous versions of RustDesk software.
7. Changes to the SLA
RustDesk reserves the right to modify this SLA at any time. Customers will be notified of significant changes via email or through the RustDesk website.
8. Contact Information
For email support, please contact: support@rustdesk.com
By using RustDesk email support, customers agree to the terms outlined in this SLA.
RustDesk Team
rustdesk.com
support@rustdesk.com

127
convertfromos.sh Normal file
View File

@@ -0,0 +1,127 @@
#!/bin/bash
# This script will do the following to install RustDesk Server Pro replacing RustDesk Server Open Source
# 1. Disable and removes the old services
# 2. Install some dependencies
# 3. Setup UFW firewall if available
# 4. Create a folder /var/lib/rustdesk-server and copy the certs here
# 5. Download and extract RustDesk Pro Services to the above folder
# 6. Create systemd services for hbbs and hbbr
# 7. If you choose Domain, it will install Nginx and Certbot, allowing the API to be available on port 443 (https) and get an SSL certificate over port 80, it is automatically renewed
##################################################################################################################
# Install curl and whiptail if needed
if [ ! -x "$(command -v curl)" ] || [ ! -x "$(command -v whiptail)" ]
then
# We need curl to fetch the lib
# There are the package managers for different OS:
# osInfo[/etc/redhat-release]=yum
# osInfo[/etc/arch-release]=pacman
# osInfo[/etc/gentoo-release]=emerge
# osInfo[/etc/SuSE-release]=zypp
# osInfo[/etc/debian_version]=apt-get
# osInfo[/etc/alpine-release]=apk
NEEDED_DEPS=(curl whiptail)
echo "Installing these packages:" "${NEEDED_DEPS[@]}"
if [ -x "$(command -v apt-get)" ]
then
sudo apt-get install "${NEEDED_DEPS[@]}" -y
elif [ -x "$(command -v apk)" ]
then
sudo apk add --no-cache "${NEEDED_DEPS[@]}"
elif [ -x "$(command -v dnf)" ]
then
sudo dnf install "${NEEDED_DEPS[@]}"
elif [ -x "$(command -v zypper)" ]
then
sudo zypper install "${NEEDED_DEPS[@]}"
elif [ -x "$(command -v pacman)" ]
then
sudo pacman -S install "${NEEDED_DEPS[@]}"
elif [ -x "$(command -v yum)" ]
then
sudo yum install "${NEEDED_DEPS[@]}"
elif [ -x "$(command -v emerge)" ]
then
sudo emerge -av "${NEEDED_DEPS[@]}"
else
echo "FAILED TO INSTALL! Package manager not found. You must manually install:" "${NEEDED_DEPS[@]}"
exit 1
fi
fi
# We need to source directly from the Github repo to be able to use the functions here
# shellcheck disable=2034,2059,2164
true
SCRIPT_NAME="Install script"
export SCRIPT_NAME
# shellcheck source=lib.sh
source <(curl -sL https://raw.githubusercontent.com/rustdesk/rustdesk-server-pro/main/lib.sh)
# see https://github.com/koalaman/shellcheck/wiki/Directive
unset SCRIPT_NAME
##################################################################################################################
# Check if root
root_check
# Output debugging info if $DEBUG set
if [ "$DEBUG" = "true" ]
then
identify_os
print_text_in_color "$ICyan" "OS: $OS"
print_text_in_color "$ICyan" "VER: $VER"
print_text_in_color "$ICyan" "UPSTREAM_ID: $UPSTREAM_ID"
exit 0
fi
# Stop all old services
sudo systemctl stop gohttpserver.service
sudo systemctl stop rustdesksignal.service
sudo systemctl stop rustdeskrelay.service
sudo systemctl disable gohttpserver.service
sudo systemctl disable rustdesksignal.service
sudo systemctl disable rustdeskrelay.service
sudo rm -f /etc/systemd/system/gohttpserver.service
sudo rm -f /etc/systemd/system/rustdesksignal.service
sudo rm -f /etc/systemd/system/rustdeskrelay.service
# Install Rustdesk again
# It won't install RustDesk again since there's a check in the install script which checks for the installation folder, but services and everything else will be created
# Would it be possible to move L93-98 after the installation?
if ! curl -fSLO --retry 3 https://raw.githubusercontent.com/rustdesk/rustdesk-server-pro/main/install.sh
then
msg_box "Sorry, we couldn't fetch the install script, please try again.
Your old installation still lives in /opt/rustdesk"
exit
else
if sudo bash -x install.sh
then
rm -f install.sh
# Migration tasks
if [ -d /opt/rustdesk ]
then
# First remove the keys generated by the installation script
rm -f "$RUSTDESK_INSTALL_DIR"/id_*
# Then copy over the old keys to the new install dir
if cp -f /opt/rustdesk/id_* "$RUSTDESK_INSTALL_DIR/"
then
# Make sure to really protect the old keys by checking that the new service actually restarts with 0 status before removing the old keys.
if systemctl restart rustdesk-hbbr.service && systemctl restart rustdesk-hbbs.service
then
rm -rf /opt/rustdesk
else
msg_box "Sorry, couldn't restart the new services. Please send your output to https://github.com/rustdesk/rustdesk-server-pro in a new issue."
fi
else
msg_box "Sorry, but it seems that something went wrong with copying your old keys to the new install dir. Please try again"
exit 1
fi
fi
msg_box "Conversion from OS seems to have been OK!"
else
msg_box "Sorry, but something seems to have gone wrong, please report this to:
https://github.com/rustdesk/rustdesk-server-pro/"
fi
fi

496
install.sh Normal file
View File

@@ -0,0 +1,496 @@
#!/bin/bash
# This script will do the following to install RustDesk Server Pro
# 1. Install some dependencies
# 2. Setup UFW firewall if available
# 3. Create 2 folders /var/lib/rustdesk-server and /var/log/rustdesk-server ("$RUSTDESK_INSTALL_DIR" and "$RUSTDESK_LOG_DIR")
# 4. Download and extract RustDesk Pro Services to the above folder
# 5. Create systemd services for hbbs and hbbr
# 6. If you choose Domain, it will install Nginx and Certbot, allowing the API to be available on port 443 (https) and get an SSL certificate over port 80, it is automatically renewed
# Please note; even if the script is run as root, you will still be able to choose a non-root user during setup.
##################################################################################################################
TLS=""
if command -v ldconfig &> /dev/null; then
if ldconfig -p | grep -q "libssl.so.3"; then
TLS="-nativetls"
fi
fi
# Install curl and whiptail if needed
if [ ! -x "$(command -v curl)" ] || [ ! -x "$(command -v whiptail)" ]
then
# We need curl to fetch the lib
# There are the package managers for different OS:
# osInfo[/etc/redhat-release]=yum
# osInfo[/etc/arch-release]=pacman
# osInfo[/etc/gentoo-release]=emerge
# osInfo[/etc/SuSE-release]=zypp
# osInfo[/etc/debian_version]=apt-get
# osInfo[/etc/alpine-release]=apk
NEEDED_DEPS=(curl whiptail)
echo "Installing these packages:" "${NEEDED_DEPS[@]}"
if [ -x "$(command -v apt-get)" ]
then
sudo apt-get install "${NEEDED_DEPS[@]}" -y
elif [ -x "$(command -v apk)" ]
then
sudo apk add --no-cache "${NEEDED_DEPS[@]}"
elif [ -x "$(command -v dnf)" ]
then
sudo dnf install "${NEEDED_DEPS[@]}"
elif [ -x "$(command -v zypper)" ]
then
sudo zypper install "${NEEDED_DEPS[@]}"
elif [ -x "$(command -v pacman)" ]
then
sudo pacman -S install "${NEEDED_DEPS[@]}"
elif [ -x "$(command -v yum)" ]
then
sudo yum install "${NEEDED_DEPS[@]}"
elif [ -x "$(command -v emerge)" ]
then
sudo emerge -av "${NEEDED_DEPS[@]}"
else
echo "FAILED TO INSTALL! Package manager not found. You must manually install:" "${NEEDED_DEPS[@]}"
exit 1
fi
fi
# We need to source directly from the Github repo to be able to use the functions here
# shellcheck disable=2034,2059,2164
true
SCRIPT_NAME="Install script"
export SCRIPT_NAME
# shellcheck source=lib.sh
source <(curl -sL https://raw.githubusercontent.com/rustdesk/rustdesk-server-pro/main/lib.sh)
# see https://github.com/koalaman/shellcheck/wiki/Directive
unset SCRIPT_NAME
##################################################################################################################
# Check if root
root_check
# Output debugging info if $DEBUG set
if [ "$DEBUG" = "true" ]
then
identify_os
print_text_in_color "$ICyan" "OS: $OS"
print_text_in_color "$ICyan" "VER: $VER"
print_text_in_color "$ICyan" "UPSTREAM_ID: $UPSTREAM_ID"
exit 0
fi
# We need the WAN IP
get_wanip4
# Automatic restart of services while installing
# Restart mode: (l)ist only, (i)nteractive or (a)utomatically.
if [ ! -f /etc/needrestart/needrestart.conf ]
then
install_linux_package needrestart
if ! grep -rq "{restart} = 'a'" /etc/needrestart/needrestart.conf
then
# Restart mode: (l)ist only, (i)nteractive or (a)utomatically.
sed -i "s|#\$nrconf{restart} =.*|\$nrconf{restart} = 'a'\;|g" /etc/needrestart/needrestart.conf
fi
fi
# Select user for installation
msg_box "Rustdesk can be installed as an unprivileged user, but we need root for everything else.
Running with an unprivileged user enhances security, and is recommended."
if yesno_box_yes "Do you want to use an unprivileged user for Rustdesk?"
then
while :
do
RUSTDESK_USER=$(input_box_flow "Please enter the name of your non-root user:")
if ! id "$RUSTDESK_USER"
then
msg_box "We couldn't find $RUSTDESK_USER on the system, are you sure it's correct?
Please try again."
else
break
fi
done
run_as_non_root_user() {
sudo -u "$RUSTDESK_USER" "$@";
}
fi
# Install needed dependencies
install_linux_package unzip
install_linux_package tar
install_linux_package dnsutils
install_linux_package ufw
if ! install_linux_package bind9-utils
then
install_linux_package bind-utils
fi
if ! install_linux_package bind9
then
install_linux_package bind
fi
# Setting up firewall
ufw allow 21115:21119/tcp
ufw allow 22/tcp
ufw allow 21116/udp
# Download latest version of RustDesk
RDLATEST=$(curl https://api.github.com/repos/rustdesk/rustdesk-server-pro/releases/latest -s | grep "tag_name"| awk '{print substr($2, 2, length($2)-3) }')
# Download, extract, and move Rustdesk in place
if [ -n "${ARCH}" ]
then
# If not /var/lib/rustdesk-server/ ($RUSTDESK_INSTALL_DIR) exists we can assume this is a fresh install. If it exists though, we can't move it and it will produce an error
if [ ! -d "$RUSTDESK_INSTALL_DIR" ]
then
print_text_in_color "$IGreen" "Installing RustDesk Server..."
# Create dir
mkdir -p "$RUSTDESK_INSTALL_DIR"
if [ -d "$RUSTDESK_INSTALL_DIR" ]
then
cd "$RUSTDESK_INSTALL_DIR"
else
msg_box "It seems like the installation folder wasn't created, we can't continue.
Please report this to: https://github.com/rustdesk/rustdesk-server-pro/issues"
exit 1
fi
# Since the name of the actual tar files differs from the output of uname -m we need to rename acutal download file.
# Preferably we would instead rename the download tarballs to the output of uname -m. This would make it possible to run a single $VAR for ARCH.
if [ "${ARCH}" = "x86_64" ]
then
ACTUAL_TAR_NAME=amd64
elif [ "${ARCH}" = "armv7l" ]
then
ACTUAL_TAR_NAME=armv7
elif [ "${ARCH}" = "aarch64" ]
then
ACTUAL_TAR_NAME=arm64v8
fi
ACTUAL_TAR_NAME=${ACTUAL_TAR_NAME}${TLS}
# Download
if ! curl -fSLO --retry 3 https://github.com/rustdesk/rustdesk-server-pro/releases/download/"${RDLATEST}"/rustdesk-server-linux-"${ACTUAL_TAR_NAME}".tar.gz
then
msg_box "Sorry, the installation package failed to download.
This might be temporary, so please try to run the installation script again."
exit 1
fi
# Extract, move in place, and make it executable
tar -xf rustdesk-server-linux-"${ACTUAL_TAR_NAME}".tar.gz
# Set permissions
if [ -n "$RUSTDESK_USER" ]
then
chown "$RUSTDESK_USER":"$RUSTDESK_USER" -R "$RUSTDESK_INSTALL_DIR"
fi
# Move as root if RUSTDESK_USER is not set.
if [ -n "$RUSTDESK_USER" ]
then
run_as_non_root_user mv "${ACTUAL_TAR_NAME}"/static "$RUSTDESK_INSTALL_DIR"
else
mv "${ACTUAL_TAR_NAME}"/static "$RUSTDESK_INSTALL_DIR"
fi
mv "${ACTUAL_TAR_NAME}"/hbbr /usr/bin/
mv "${ACTUAL_TAR_NAME}"/hbbs /usr/bin/
mv "${ACTUAL_TAR_NAME}"/rustdesk-utils /usr/bin/
rm -rf "$RUSTDESK_INSTALL_DIR"/"${ACTUAL_TAR_NAME:?}"
rm -rf rustdesk-server-linux-"${ACTUAL_TAR_NAME}".tar.gz
chmod +x /usr/bin/hbbs
chmod +x /usr/bin/hbbr
chmod +x /usr/bin/rustdesk-utils
if [ -n "$RUSTDESK_USER" ]
then
chown "$RUSTDESK_USER":"$RUSTDESK_USER" -R /usr/bin/hbbr
chown "$RUSTDESK_USER":"$RUSTDESK_USER" -R /usr/bin/hbbs
chown "$RUSTDESK_USER":"$RUSTDESK_USER" -R /usr/bin/rustdesk-utils
fi
else
print_text_in_color "$IGreen" "Rustdesk server already installed."
fi
else
msg_box "Sorry, we can't figure out your distro, this script will now exit.
Please report this to: https://github.com/rustdesk/rustdesk-server-pro/issues"
exit 1
fi
# Make folder /var/log/rustdesk-server/
if [ ! -d "$RUSTDESK_LOG_DIR" ]
then
print_text_in_color "$IGreen" "Creating $RUSTDESK_LOG_DIR"
install -d -m 700 "$RUSTDESK_LOG_DIR"
# Set permissions
if [ -n "$RUSTDESK_USER" ]
then
chown -R "$RUSTDESK_USER":"$RUSTDESK_USER" "$RUSTDESK_LOG_DIR"
fi
fi
# Setup systemd to launch hbbs
if [ ! -f "/etc/systemd/system/rustdesk-hbbs.service" ]
then
touch "/etc/systemd/system/rustdesk-hbbs.service"
if [ -n "$RUSTDESK_USER" ]
then
cat << HBBS_RUSTDESK_SERVICE > "/etc/systemd/system/rustdesk-hbbs.service"
[Unit]
Description=RustDesk Signal Server
[Service]
Type=simple
LimitNOFILE=1000000
ExecStart=/usr/bin/hbbs
WorkingDirectory=$RUSTDESK_INSTALL_DIR
User=${RUSTDESK_USER}
Group=${RUSTDESK_USER}
Restart=always
StandardOutput=append:$RUSTDESK_LOG_DIR/hbbs.log
StandardError=append:$RUSTDESK_LOG_DIR/hbbs.error
# Restart service after 10 seconds if node service crashes
RestartSec=10
[Install]
WantedBy=multi-user.target
HBBS_RUSTDESK_SERVICE
else
cat << HBBS_RUSTDESK_SERVICE > "/etc/systemd/system/rustdesk-hbbs.service"
[Unit]
Description=RustDesk Signal Server
[Service]
Type=simple
LimitNOFILE=1000000
ExecStart=/usr/bin/hbbs
WorkingDirectory=$RUSTDESK_INSTALL_DIR
User=root
Group=root
Restart=always
StandardOutput=append:$RUSTDESK_LOG_DIR/hbbs.log
StandardError=append:$RUSTDESK_LOG_DIR/hbbs.error
# Restart service after 10 seconds if node service crashes
RestartSec=10
[Install]
WantedBy=multi-user.target
HBBS_RUSTDESK_SERVICE
fi
fi
# Setup systemd to launch hbbr
if [ ! -f "/etc/systemd/system/rustdesk-hbbr.service" ]
then
touch "/etc/systemd/system/rustdesk-hbbr.service"
if [ -n "$RUSTDESK_USER" ]
then
cat << HBBR_RUSTDESK_SERVICE > "/etc/systemd/system/rustdesk-hbbr.service"
[Unit]
Description=RustDesk Relay Server
[Service]
Type=simple
LimitNOFILE=1000000
ExecStart=/usr/bin/hbbr
WorkingDirectory=$RUSTDESK_INSTALL_DIR
User=${RUSTDESK_USER}
Group=${RUSTDESK_USER}
Restart=always
StandardOutput=append:$RUSTDESK_LOG_DIR/hbbr.log
StandardError=append:$RUSTDESK_LOG_DIR/hbbr.error
# Restart service after 10 seconds if node service crashes
RestartSec=10
[Install]
WantedBy=multi-user.target
HBBR_RUSTDESK_SERVICE
else
cat << HBBR_RUSTDESK_SERVICE > "/etc/systemd/system/rustdesk-hbbr.service"
[Unit]
Description=RustDesk Relay Server
[Service]
Type=simple
LimitNOFILE=1000000
ExecStart=/usr/bin/hbbr
WorkingDirectory=$RUSTDESK_INSTALL_DIR
User=root
Group=root
Restart=always
StandardOutput=append:$RUSTDESK_LOG_DIR/hbbr.log
StandardError=append:$RUSTDESK_LOG_DIR/hbbr.error
# Restart service after 10 seconds if node service crashes
RestartSec=10
[Install]
WantedBy=multi-user.target
HBBR_RUSTDESK_SERVICE
fi
fi
# Enable services
# HBBR
systemctl enable rustdesk-hbbr.service
systemctl start rustdesk-hbbr.service
# HBBS
systemctl enable rustdesk-hbbs.service
systemctl start rustdesk-hbbs.service
while :
do
if ! systemctl status rustdesk-hbbr.service | grep "Active: active (running)"
then
sleep 2
print_text_in_color "$ICyan" "Waiting for RustDesk Relay service to become active..."
else
break
fi
done
while :
do
PUBKEYNAME=$(find "$RUSTDESK_INSTALL_DIR" -name "*.pub")
if [ -z "$PUBKEYNAME" ]
then
print_text_in_color "$ICyan" "Checking if public key is generated..."
sleep 5
else
print_text_in_color "$IGreen" "Public key path: $PUBKEYNAME"
PUBLICKEY=$(cat "$PUBKEYNAME")
break
fi
done
choice=$(whiptail --title "Rustdesk installation script" --menu \
"Choose your preferred option, IP or DNS/Domain:
DNS = Setup Rustdesk with TLS and your own domain
IP = You don't have a domain, only plain IP
$MENU_GUIDE\n\n$RUN_LATER_GUIDE" "$WT_HEIGHT" "$WT_WIDTH" 4 \
"DNS" "(e.g. rustdesk.example.com)" \
"IP" "($WANIP4)" 3>&1 1>&2 2>&3)
case "$choice" in
"DNS")
# Enter domain
while :
do
RUSTDESK_DOMAIN=$(input_box_flow "Please enter your domain, e.g. rustdesk.example.com")
DIG=$(dig +short "${RUSTDESK_DOMAIN}" @8.8.8.8)
if ! [[ "$RUSTDESK_DOMAIN" =~ ^[a-zA-Z0-9]+([a-zA-Z0-9.-]*[a-zA-Z0-9]+)?$ ]]
then
msg_box "$RUSTDESK_DOMAIN is an invalid domain/DNS address! Please try again."
else
break
fi
done
# Check if DNS are forwarded correctly
if dig +short "$RUSTDESK_DOMAIN" @8.8.8.8 | grep -q "$WANIP4"
then
print_text_in_color "$IGreen" "DNS seems correct when checking with dig!"
else
msg_box "DNS lookup failed with dig. The external IP ($WANIP4) \
address of this server is not the same as the A-record ($DIG).
Please check your DNS settings! Maybe the domain hasn't propagated?
Please check https://www.whatsmydns.net/#A/${RUSTDESK_DOMAIN} if the IP seems correct."
exit 1
fi
# Install packages
print_text_in_color "$IGreen" "Installing Nginx and Cerbot..."
if yesno_box_yes "We use Certbot to generate the free TLS certificate from Let's Encrypt.
The default behavior of installing Certbot is to use the snap package which auto updates, and provides the latest version of Certbot. If you don't like snap packages, you can opt out now and we'll use regular (old) deb packages instead.
Do you want to install Certbot with snap? (recommended)"
then
install_linux_package nginx
if ! install_linux_package snapd
then
print_text_in_color "$IRed" "Sorry, snapd wasn't found on your system, using 'python3-certbot-nginx' instead."
install_linux_package python3-certbot-nginx
else
snap install certbot --classic
fi
else
install_linux_package nginx
install_linux_package python3-certbot-nginx
fi
# Add Nginx config
if [ -d "/etc/nginx/sites-available" ] && [ -d "/etc/nginx/sites-enabled" ]
then
SITES_CONF_DIR="sites-available"
elif [ -d "/etc/nginx/conf.d" ]
then
SITES_CONF_DIR="conf.d"
else
msg_box "Couldn't find the Nginx config directory. Please check your system!"
exit 1
fi
if [ ! -f "/etc/nginx/$SITES_CONF_DIR/rustdesk.conf" ]
then
touch "/etc/nginx/$SITES_CONF_DIR/rustdesk.conf"
cat << NGINX_RUSTDESK_CONF > "/etc/nginx/$SITES_CONF_DIR/rustdesk.conf"
server {
server_name ${RUSTDESK_DOMAIN};
location / {
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:21114/;
}
}
NGINX_RUSTDESK_CONF
fi
# Enable the Nginx config file
if [ "$SITES_CONF_DIR" = "sites-available" ] && [ ! -f /etc/nginx/sites-enabled/rustdesk.conf ]
then
ln -s /etc/nginx/sites-available/rustdesk.conf /etc/nginx/sites-enabled/rustdesk.conf
fi
# Enable firewall rules for the domain
ufw allow 80/tcp
ufw allow 443/tcp
ufw --force enable
ufw --force reload
# Generate the certifictae
if ! certbot --nginx --cert-name "${RUSTDESK_DOMAIN}" --key-type ecdsa --renew-by-default --no-eff-email --agree-tos --server https://acme-v02.api.letsencrypt.org/directory -d "${RUSTDESK_DOMAIN}"
then
msg_box "Sorry, the TLS certificate for $RUSTDESK_DOMAIN failed to generate!
Please check that port 80/443 are correctly port forwarded, and that the DNS record points to this servers IP.
Please try again."
exit
fi
;;
"IP")
ufw allow 21114/tcp
ufw --force enable
ufw --force reload
;;
*)
;;
esac
# Display final info!
if [ -n "$RUSTDESK_DOMAIN" ]
then
msg_box "
Your Public Key is:
$PUBLICKEY
Your DNS Address is:
$RUSTDESK_DOMAIN
Please login at https://$RUSTDESK_DOMAIN
Default User/Pass: admin/test1234"
else
msg_box "
Your Public Key is:
$PUBLICKEY
Your IP Address is:
$WANIP4
Please login at http://$WANIP4:21114
Default User/Pass: admin/test1234"
fi
print_text_in_color "$IGreen" "Cleaning up..."
rm -f rustdesk-server-linux-"${ACTUAL_TAR_NAME}".zip
rm -rf "${ACTUAL_TAR_NAME}"

288
lib.sh Normal file
View File

@@ -0,0 +1,288 @@
#!/bin/bash
# shellcheck disable=SC2034
true
# see https://github.com/koalaman/shellcheck/wiki/Directive
############ Variables
# PATH & DIR
RUSTDESK_INSTALL_DIR=/var/lib/rustdesk-server
RUSTDESK_LOG_DIR=/var/log/rustdesk-server
# OS
ARCH=$(uname -m)
get_wanip4() {
WANIP4=$(curl -s -k -m 5 -4 https://api64.ipify.org)
}
# Whiptail menus
TITLE="RustDesk - $(date +%Y)"
[ -n "$SCRIPT_NAME" ] && TITLE+=" - $SCRIPT_NAME"
CHECKLIST_GUIDE="Navigate with the [ARROW] keys and (de)select with the [SPACE] key. \
Confirm by pressing [ENTER]. Cancel by pressing [ESC]."
MENU_GUIDE="Navigate with the [ARROW] keys and confirm by pressing [ENTER]. Cancel by pressing [ESC]."
############ Functions
is_root() {
if [[ "$EUID" -ne 0 ]]
then
return 1
else
return 0
fi
}
root_check() {
if ! is_root
then
msg_box "Sorry, you are not root. You now have two options:
1. Use SUDO directly:
a) :~$ sudo bash name-of-script.sh
2. Become ROOT and then type your command:
a) :~$ sudo -i
b) :~# bash name-of-script.sh
More information can be found here: https://unix.stackexchange.com/a/3064"
exit 1
fi
}
print_text_in_color() {
printf "%b%s%b\n" "$1" "$2" "$Color_Off"
}
msg_box() {
[ -n "$2" ] && local SUBTITLE=" - $2"
whiptail --title "$TITLE$SUBTITLE" --msgbox "$1" "$WT_HEIGHT" "$WT_WIDTH" 3>&1 1>&2 2>&3
}
yesno_box_yes() {
[ -n "$2" ] && local SUBTITLE=" - $2"
if (whiptail --title "$TITLE$SUBTITLE" --yesno "$1" "$WT_HEIGHT" "$WT_WIDTH" 3>&1 1>&2 2>&3)
then
return 0
else
return 1
fi
}
yesno_box_no() {
[ -n "$2" ] && local SUBTITLE=" - $2"
if (whiptail --title "$TITLE$SUBTITLE" --defaultno --yesno "$1" "$WT_HEIGHT" "$WT_WIDTH" 3>&1 1>&2 2>&3)
then
return 0
else
return 1
fi
}
input_box() {
[ -n "$2" ] && local SUBTITLE=" - $2"
local RESULT && RESULT=$(whiptail --title "$TITLE$SUBTITLE" --nocancel --inputbox "$1" "$WT_HEIGHT" "$WT_WIDTH" 3>&1 1>&2 2>&3)
echo "$RESULT"
}
input_box_flow() {
local RESULT
while :
do
RESULT=$(input_box "$1" "$2")
if [ -z "$RESULT" ]
then
msg_box "Input is empty, please try again." "$2"
elif ! yesno_box_yes "Is this correct? $RESULT" "$2"
then
msg_box "OK, please try again." "$2"
else
break
fi
done
echo "$RESULT"
}
identify_os() {
if [ -f /etc/os-release ]
then
# freedesktop.org and systemd
# shellcheck source=/dev/null
source /etc/os-release
OS=$NAME
VER=$VERSION_ID
UPSTREAM_ID=${ID_LIKE,,}
# Fallback to ID_LIKE if ID was not 'ubuntu' or 'debian'
if [ "${UPSTREAM_ID}" != "debian" ] && [ "${UPSTREAM_ID}" != "ubuntu" ]
then
UPSTREAM_ID="$(echo "${ID_LIKE,,}" | sed s/\"//g | cut -d' ' -f1)"
fi
elif type lsb_release >/dev/null 2>&1
then
# linuxbase.org
OS=$(lsb_release -si)
VER=$(lsb_release -sr)
elif [ -f /etc/lsb-release ]
then
# For some versions of Debian/Ubuntu without lsb_release command
# shellcheck source=/dev/null
source /etc/os-release
OS=$DISTRIB_ID
VER=$DISTRIB_RELEASE
elif [ -f /etc/debian_version ]
then
# Older Debian, Ubuntu, etc.
OS=Debian
VER=$(cat /etc/debian_version)
elif [ -f /etc/SuSE-release ]
then
# Older SuSE, etc.
OS=SuSE
VER=$(cat /etc/SuSE-release)
elif [ -f /etc/redhat-release ]
then
# Older Red Hat, CentOS, etc.
OS=RedHat
VER=$(cat /etc/redhat-release)
else
# Fall back to uname, e.g. "Linux <version>", also works for BSD, etc.
OS=$(uname -s)
VER=$(uname -r)
fi
}
install_linux_package() {
# Install based on OS
# osInfo[/etc/redhat-release]=yum
# osInfo[/etc/arch-release]=pacman
# osInfo[/etc/gentoo-release]=emerge
# osInfo[/etc/SuSE-release]=zypp
# osInfo[/etc/debian_version]=apt-get
# osInfo[/etc/alpine-release]=apk
print_text_in_color "$IGreen" "Installing ${1}..."
if [ -x "$(command -v apt-get)" ]
then
sudo apt-get install "${1}" -y
elif [ -x "$(command -v apk)" ]
then
sudo apk add --no-cache "${1}"
elif [ -x "$(command -v dnf)" ]
then
sudo dnf install "${1}"
elif [ -x "$(command -v zypper)" ]
then
sudo zypper install "${1}"
elif [ -x "$(command -v pacman)" ]
then
sudo pacman -S install "${1}"
elif [ -x "$(command -v yum)" ]
then
sudo yum install "${1}"
elif [ -x "$(command -v emerge)" ]
then
sudo emerge -av "${1}"
else
print_text_in_color "$IRed" "FAILED TO INSTALL ${1}! Package manager not found: Your OS is currently unsupported."
fi
}
purge_linux_package() {
if [ -x "$(command -v apt-get)" ]
then
sudo apt-get purge --autoremove -y "${1}"
elif [ -x "$(command -v apk)" ]
then
sudo apk del "${1}"
elif [ -x "$(command -v dnf)" ]
then
sudo dnf purge "${1}"
elif [ -x "$(command -v zypper)" ]
then
sudo zypper remove "${1}"
elif [ -x "$(command -v pacman)" ]
then
sudo pacman -Rs "${1}"
elif [ -x "$(command -v yum)" ]
then
sudo yum remove "${1}"
elif [ -x "$(command -v emerge)" ]
then
sudo emerge -Cv "${1}"
else
print_text_in_color "$IRed" "FAILED TO REMOVE ${1}! Package manager not found: Your OS is currently unsupported."
fi
}
## bash colors
# Reset
Color_Off='\e[0m' # Text Reset
# Regular Colors
Black='\e[0;30m' # Black
Red='\e[0;31m' # Red
Green='\e[0;32m' # Green
Yellow='\e[0;33m' # Yellow
Blue='\e[0;34m' # Blue
Purple='\e[0;35m' # Purple
Cyan='\e[0;36m' # Cyan
White='\e[0;37m' # White
# Bold
BBlack='\e[1;30m' # Black
BRed='\e[1;31m' # Red
BGreen='\e[1;32m' # Green
BYellow='\e[1;33m' # Yellow
BBlue='\e[1;34m' # Blue
BPurple='\e[1;35m' # Purple
BCyan='\e[1;36m' # Cyan
BWhite='\e[1;37m' # White
# Underline
UBlack='\e[4;30m' # Black
URed='\e[4;31m' # Red
UGreen='\e[4;32m' # Green
UYellow='\e[4;33m' # Yellow
UBlue='\e[4;34m' # Blue
UPurple='\e[4;35m' # Purple
UCyan='\e[4;36m' # Cyan
UWhite='\e[4;37m' # White
# Background
On_Black='\e[40m' # Black
On_Red='\e[41m' # Red
On_Green='\e[42m' # Green
On_Yellow='\e[43m' # Yellow
On_Blue='\e[44m' # Blue
On_Purple='\e[45m' # Purple
On_Cyan='\e[46m' # Cyan
On_White='\e[47m' # White
# High Intensity
IBlack='\e[0;90m' # Black
IRed='\e[0;91m' # Red
IGreen='\e[0;92m' # Green
IYellow='\e[0;93m' # Yellow
IBlue='\e[0;94m' # Blue
IPurple='\e[0;95m' # Purple
ICyan='\e[0;96m' # Cyan
IWhite='\e[0;97m' # White
# Bold High Intensity
BIBlack='\e[1;90m' # Black
BIRed='\e[1;91m' # Red
BIGreen='\e[1;92m' # Green
BIYellow='\e[1;93m' # Yellow
BIBlue='\e[1;94m' # Blue
BIPurple='\e[1;95m' # Purple
BICyan='\e[1;96m' # Cyan
BIWhite='\e[1;97m' # White
# High Intensity backgrounds
On_IBlack='\e[0;100m' # Black
On_IRed='\e[0;101m' # Red
On_IGreen='\e[0;102m' # Green
On_IYellow='\e[0;103m' # Yellow
On_IBlue='\e[0;104m' # Blue
On_IPurple='\e[0;105m' # Purple
On_ICyan='\e[0;106m' # Cyan
On_IWhite='\e[0;107m' # White

46
terms Normal file
View File

@@ -0,0 +1,46 @@
Purslane Limited Software License Agreement
IMPORTANT: PLEASE READ THIS SOFTWARE LICENSE AGREEMENT ("LICENSE AGREEMENT") CAREFULLY BEFORE USING THE RustDesk Server Pro SOFTWARE. BY USING THE SOFTWARE, YOU (EITHER AN INDIVIDUAL OR A SINGLE ENTITY) AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE AGREEMENT. IF YOU DO NOT AGREE TO THE TERMS OF THIS LICENSE AGREEMENT, DO NOT USE THE SOFTWARE.
1. License Grant:
Subject to the terms and conditions of this License Agreement, Purslane Limited ("Licensor") grants you a non-exclusive, non-transferable license to use the RustDesk Server Pro software ("Software") for your internal business purposes. This license is granted on a per-server (per-machine) basis.
2 License Restrictions:
a) You shall not copy, modify, distribute, sell, lease, sublicense, or transfer the Software or any portion thereof.
b) You shall not reverse engineer, decompile, or disassemble the Software, except to the extent expressly permitted by applicable law.
c) You shall not remove or alter any proprietary notices or labels on the Software.
3. License Key:
a) Purslane Limited will provide you with a unique license key ("License Key") to activate the Software on a specific server (machine).
b) You agree that the License Key provided to you by Purslane Limited will be used exclusively on the designated server (machine) and will not be shared, transferred, or used on any other server (machine) without explicit written permission from Purslane Limited.
c) Reselling license and custom client are not allowed.
4. Term and Billing:
a) The license term for the Software shall be one (1) year, starting from the date of purchase.
b) You agree to pay the annual license fee as specified by Licensor. Failure to make timely payments may result in suspension or termination of the license.
5. Maintenance and Support:
a) Support is offered via email.
b) During the license term, Licensor may provide maintenance and support services for the Software as separately agreed upon or specified in a separate support agreement.
c) Licensor reserves the right to modify or enhance the support services at its sole discretion.
6. Intellectual Property:
a) You acknowledge that the Software and any accompanying documentation are protected by intellectual property laws and treaties.
b) You agree not to remove or alter any copyright, trademark, or other proprietary rights notices contained in or on the Software.
7. Disclaimer of Warranty:
THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. LICENSOR DISCLAIMS ALL WARRANTIES, WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
8. Limitation of Liability:
IN NO EVENT SHALL LICENSOR BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, CONSEQUENTIAL, OR PUNITIVE DAMAGES ARISING OUT OF OR RELATED TO THIS LICENSE AGREEMENT OR THE USE OF THE SOFTWARE, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
9. Termination:
This License Agreement is effective until terminated. Licensor may terminate this License Agreement immediately upon notice to you if you breach any of the terms and conditions. Upon termination, you must cease all use of the Software and destroy all copies in your possession.
10. Governing Law:
This License Agreement shall be governed by and construed in accordance with the laws of The Cayman Islands. Any legal action or proceeding arising under this License Agreement shall be brought exclusively in the courts of The Cayman Islands.
11. Entire Agreement:
This License Agreement shall be governed by and construed in accordance with the laws of the Cayman Islands. Any legal action or proceeding arising under this License Agreement shall be brought exclusively in the courts of the Cayman Islands.
By using the RustDesk Server Pro software, you acknowledge that you have read and understood this License Agreement and agree to be bound by its terms and conditions.

266
uninstall.sh Normal file
View File

@@ -0,0 +1,266 @@
#!/bin/bash
##################################################################################################################
# Install curl and whiptail if needed
if [ ! -x "$(command -v curl)" ] || [ ! -x "$(command -v whiptail)" ]
then
# We need curl to fetch the lib
# There are the package managers for different OS:
# osInfo[/etc/redhat-release]=yum
# osInfo[/etc/arch-release]=pacman
# osInfo[/etc/gentoo-release]=emerge
# osInfo[/etc/SuSE-release]=zypp
# osInfo[/etc/debian_version]=apt-get
# osInfo[/etc/alpine-release]=apk
NEEDED_DEPS=(curl whiptail)
echo "Installing" "${NEEDED_DEPS[@]}"
if [ -x "$(command -v apt-get)" ]
then
sudo apt-get install "${NEEDED_DEPS[@]}" -y
elif [ -x "$(command -v apk)" ]
then
sudo apk add --no-cache "${NEEDED_DEPS[@]}"
elif [ -x "$(command -v dnf)" ]
then
sudo dnf install "${NEEDED_DEPS[@]}"
elif [ -x "$(command -v zypper)" ]
then
sudo zypper install "${NEEDED_DEPS[@]}"
elif [ -x "$(command -v pacman)" ]
then
sudo pacman -S install "${NEEDED_DEPS[@]}"
elif [ -x "$(command -v yum)" ]
then
sudo yum install "${NEEDED_DEPS[@]}"
elif [ -x "$(command -v emerge)" ]
then
sudo emerge -av "${NEEDED_DEPS[@]}"
else
echo "FAILED TO INSTALL! Package manager not found. You must manually install:" "${NEEDED_DEPS[@]}"
exit 1
fi
fi
# We need to source directly from the Github repo to be able to use the functions here
# shellcheck disable=2034,2059,2164
true
SCRIPT_NAME="Uninstall script"
export SCRIPT_NAME
# shellcheck source=lib.sh
source <(curl -sL https://raw.githubusercontent.com/rustdesk/rustdesk-server-pro/main/lib.sh)
# see https://github.com/koalaman/shellcheck/wiki/Directive
unset SCRIPT_NAME
##################################################################################################################
# Check if root
root_check
# Output debugging info if $DEBUG set
if [ "$DEBUG" = "true" ]
then
identify_os
print_text_in_color "$ICyan" "OS: $OS"
print_text_in_color "$ICyan" "VER: $VER"
print_text_in_color "$ICyan" "UPSTREAM_ID: $UPSTREAM_ID"
exit 0
fi
# Switch for Certbot
if [ -d /etc/letsencrypt ]
then
CERTBOT_SWITCH=ON
else
CERTBOT_SWITCH=OFF
fi
# Uninstall Rustdesk Menu
choice=$(whiptail --title "$TITLE" --checklist \
"Please choose what to uninstall:\n\n
$CHECKLIST_GUIDE\n\n$RUN_LATER_GUIDE" "$WT_HEIGHT" "$WT_WIDTH" 4 \
"certbot" "(Everything related to Let's Encrypt)" "$CERTBOT_SWITCH" \
"rustdesk-logs" "(RustDesk LOG dir)" ON \
"rustdesk-server" "(RustDesk SERVER + RustDesk services)" ON \
"nginx-rustdesk" "(RustDesk Nginx config)" OFF \
"nginx" "(Linux webserver package + ALL configs)" ON \
"ufw" "(Linux firewall package + RustDesk rules)" ON \
"whiptail" "(Linux menu package)" ON \
"curl" "(Linux package)" OFF \
"wget" "(Linux package)" OFF \
"unzip" "(Linux package)" OFF \
"dnsutils" "(Linux package)" ON \
"bind-utils" "(Linux package)" ON \
"bind" "(Linux package)" ON 3>&1 1>&2 2>&3)
case "$choice" in
*"nginx-rustdesk"*)
REMOVE_NGINX_CONF="yes"
;;&
*"nginx"*)
REMOVE_NGINX_ALL="yes"
;;&
*"wget"*)
REMOVE_WGET="yes"
;;&
*"whiptail"*)
REMOVE_WHIPTAIL="yes"
;;&
*"unzip"*)
REMOVE_UNZIP="yes"
;;&
*"dnsutils"*)
REMOVE_DNSUTILS="yes"
;;&
*"bind-utils"*)
REMOVE_BIND_UTILS="yes"
;;&
*"bind"*)
REMOVE_BIND="yes"
;;&
*"ufw"*)
REMOVE_UFW="yes"
;;&
*"rustdesk-logs"*)
REMOVE_RUSTDESK_LOG="yes"
;;&
*"rustdesk-server"*)
REMOVE_RUSTDESK_SERVER="yes"
;;&
*"curl"*)
REMOVE_CURL="yes"
;;&
*"certbot"*)
REMOVE_CERTBOT="yes"
;;&
*)
;;
esac
msg_box "WARNING WARNING WARNING
This script will remove EVERYTHING that was chosen in the previous selection.
You can choose to opt out after you hit OK."
if ! yesno_box_no "Are you REALLY sure you want to continue with the uninstallation?"
then
exit 0
fi
if [ -n "$UFW" ]
then
# Deleting UFW rules
ufw delete allow 21115:21119/tcp
# ufw delete 22/tcp # If connected to a remote VPS, this deletion will make the connection go down
ufw delete allow 21116/udp
if [ -f "/etc/nginx/sites-available/rustdesk.conf" ] || [ -f "/etc/nginx/conf.d/rustdesk.conf" ]
then
ufw delete allow 80/tcp
ufw delete allow 443/tcp
else
ufw delete allow 21114/tcp
fi
ufw --force disable
ufw --force reload
fi
# Rustdesk Server
if [ -n "$REMOVE_RUSTDESK_SERVER" ]
then
# Rustdesk installation dir
print_text_in_color "$IGreen" "Removing RustDesk Server..."
rm -rf "$RUSTDESK_INSTALL_DIR"
rm -rf /usr/bin/hbbs
rm -rf /usr/bin/hbbr
# systemctl services
# HBBS
systemctl disable rustdesk-hbbs.service
systemctl stop rustdesk-hbbs.service
rm -f "/etc/systemd/system/rustdesk-hbbs.service"
# HBBR
systemctl disable rustdesk-hbbr.service
systemctl stop rustdesk-hbbr.service
rm -f "/etc/systemd/system/rustdesk-hbbr.service"
# daemon-reload
systemctl daemon-reload
fi
# Rustdesk LOG
if [ -n "$REMOVE_RUSTDESK_LOG" ]
then
# Rustdesk LOG dir
rm -rf "$RUSTDESK_LOG_DIR"
fi
# Certbot
if [ -n "$REMOVE_CERTBOT" ]
then
if snap list | grep -q certbot > /dev/null
then
purge_linux_package snap
snap remove certbot
else
purge_linux_package python3-certbot-nginx -y
fi
# Also remove the actual certs
rm -rf /etc/letsencrypt
fi
# Nginx
if [ -n "$REMOVE_NGINX_CONF" ]
then
rm -f "/etc/nginx/sites-available/rustdesk.conf"
rm -f "/etc/nginx/sites-enabled/rustdesk.conf"
rm -f "/etc/nginx/conf.d/rustdesk.conf"
service nginx restart
elif [ -n "$REMOVE_NGINX_ALL" ]
then
purge_linux_package nginx
rm -rf "/etc/nginx"
fi
# The rest
if [ -n "$REMOVE_CURL" ]
then
purge_linux_package curl
fi
if [ -n "$REMOVE_WGET" ]
then
purge_linux_package wget
fi
if [ -n "$REMOVE_UNZIP" ]
then
purge_linux_package unzip
fi
if [ -n "$REMOVE_DNSUTILS" ]
then
purge_linux_package dnsutils
fi
if [ -n "$REMOVE_BIND_UTILS" ]
then
purge_linux_package bind-utils
fi
if [ -n "$REMOVE_BIND" ]
then
purge_linux_package bind
fi
if [ -n "$REMOVE_UFW" ]
then
purge_linux_package ufw
fi
msg_box "Uninstallation complete!
Please hit OK to remove the last package."
if [ -n "$REMOVE_WHIPTAIL" ]
then
purge_linux_package whiptail
fi

135
update.sh Normal file
View File

@@ -0,0 +1,135 @@
#!/bin/bash
# shellcheck disable=2034,2059,2164
true
TLS=""
if command -v ldconfig &> /dev/null; then
if ldconfig -p | grep -q "libssl.so.3"; then
TLS="-nativetls"
fi
fi
# Get username
usern=$(whoami) # not used btw ... yet
# Get current release version
RDLATEST=$(curl https://api.github.com/repos/rustdesk/rustdesk-server-pro/releases/latest -s | grep "tag_name"| awk '{print substr($2, 2, length($2)-3) }')
RDCURRENT=$(/usr/bin/hbbr --version | sed -r 's/hbbr (.*)/\1/')
if [ $RDLATEST == $RDCURRENT ]; then
echo "Same version, no need to update."
exit 0
fi
sudo systemctl stop rustdesk-hbbs.service
sudo systemctl stop rustdesk-hbbr.service
sleep 20
ARCH=$(uname -m)
# Identify OS
if [ -f /etc/os-release ]; then
# freedesktop.org and systemd
. /etc/os-release
OS=$NAME
VER=$VERSION_ID
UPSTREAM_ID=${ID_LIKE,,}
# Fallback to ID_LIKE if ID was not 'ubuntu' or 'debian'
if [ "${UPSTREAM_ID}" != "debian" ] && [ "${UPSTREAM_ID}" != "ubuntu" ]; then
UPSTREAM_ID="$(echo ${ID_LIKE,,} | sed s/\"//g | cut -d' ' -f1)"
fi
elif type lsb_release >/dev/null 2>&1; then
# linuxbase.org
OS=$(lsb_release -si)
VER=$(lsb_release -sr)
elif [ -f /etc/lsb-release ]; then
# For some versions of Debian/Ubuntu without lsb_release command
. /etc/lsb-release
OS=$DISTRIB_ID
VER=$DISTRIB_RELEASE
elif [ -f /etc/debian_version ]; then
# Older Debian, Ubuntu, etc.
OS=Debian
VER=$(cat /etc/debian_version)
elif [ -f /etc/SuSE-release ]; then
# Older SuSE, etc.
OS=SuSE
VER=$(cat /etc/SuSE-release)
elif [ -f /etc/redhat-release ]; then
# Older Red Hat, CentOS, etc.
OS=RedHat
VER=$(cat /etc/redhat-release)
else
# Fall back to uname, e.g. "Linux <version>", also works for BSD, etc.
OS=$(uname -s)
VER=$(uname -r)
fi
# Output debugging info if $DEBUG set
if [ "$DEBUG" = "true" ]; then
echo "OS: $OS"
echo "VER: $VER"
echo "UPSTREAM_ID: $UPSTREAM_ID"
exit 0
fi
if ! [ -e /var/lib/rustdesk-server/ ]; then
echo "No directory /var/lib/rustdesk-server/ found. No update of RustDesk possible (use install.sh script?)"
exit 4
else
:
fi
cd /var/lib/rustdesk-server/
rm -rf static/
echo "Upgrading RustDesk Server"
if [ "${ARCH}" = "x86_64" ] ; then
wget https://github.com/rustdesk/rustdesk-server-pro/releases/download/${RDLATEST}/rustdesk-server-linux-amd64${TLS}.tar.gz
tar -xf rustdesk-server-linux-amd64${TLS}.tar.gz
mv amd64${TLS}/static /var/lib/rustdesk-server/
sudo mv amd64${TLS}/hbbr /usr/bin/
sudo mv amd64${TLS}/hbbs /usr/bin/
sudo mv amd64${TLS}/rustdesk-utils /usr/bin/
rm -rf amd64${TLS}/
rm -rf rustdesk-server-linux-amd64${TLS}.tar.gz
elif [ "${ARCH}" = "armv7l" ] ; then
wget "https://github.com/rustdesk/rustdesk-server-pro/releases/download/${RDLATEST}/rustdesk-server-linux-armv7.tar.gz"
tar -xf rustdesk-server-linux-armv7.tar.gz
mv armv7/static /var/lib/rustdesk-server/
sudo mv armv7/hbbr /usr/bin/
sudo mv armv7/hbbs /usr/bin/
sudo mv armv7/rustdesk-utils /usr/bin/
rm -rf armv7/
rm -rf rustdesk-server-linux-armv7.tar.gz
elif [ "${ARCH}" = "aarch64" ] ; then
wget "https://github.com/rustdesk/rustdesk-server-pro/releases/download/${RDLATEST}/rustdesk-server-linux-arm64v8${TLS}.tar.gz"
tar -xf rustdesk-server-linux-arm64v8${TLS}.tar.gz
mv arm64v8${TLS}/static /var/lib/rustdesk-server/
sudo mv arm64v8${TLS}/hbbr /usr/bin/
sudo mv arm64v8${TLS}/hbbs /usr/bin/
sudo mv arm64v8${TLS}/rustdesk-utils /usr/bin/
rm -rf arm64v8${TLS}/
rm -rf rustdesk-server-linux-arm64v8${TLS}.tar.gz
fi
sudo chmod +x /usr/bin/hbbs
sudo chmod +x /usr/bin/hbbr
sudo chmod +x /usr/bin/rustdesk-utils
sudo systemctl start rustdesk-hbbs.service
sudo systemctl start rustdesk-hbbr.service
while ! [[ $CHECK_RUSTDESK_READY ]]; do
CHECK_RUSTDESK_READY=$(sudo systemctl status rustdesk-hbbr.service | grep "Active: active (running)")
echo -ne "RustDesk Relay not ready yet...${NC}\n"
sleep 3
done
echo -e "Updates are complete"