Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MYST-590 terms for deb install #277

Merged
merged 5 commits into from Jul 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions TERMS.md
Expand Up @@ -58,15 +58,15 @@ You will get no remuneration or compensation of any kind for the participation i

You shall be responsible for obtaining and maintaining all necessary hardware, software and other equipment and resources needed for access to and use of the Mysterium Platform Open Alpha and all charges related thereto.

7. **OUR ROLE **
7. **OUR ROLE**

We do not encourage, support and contribute to illegal activities and we are resolved to keep the Mysterium Platform Open Alpha operating legally and to protect you. To this end, we enter into binding agreements with the Users by which they undertake to use the Mysterium Platform Open Alpha only for legal purposes; however, we have no technical possibility or intent to monitor their activities on the Network and cannot guarantee that the Users will comply.

Although we strongly believe that you should not be liable for the traffic which passes through your Node, you accept, agree and fully understand that we cannot guarantee that you will never face any legal liability. In the case you will obtain any inquiries from legal authorities about your participation in the Program or face an official investigation related to the use of your resources by the User using the Mysterium Platform Open Alpha, we are free to take a decision to provide you with any help and assistance, including legal advice, that we might find necessary or suitable in the specific situation.

If you need our help or advice, please contact us immediately at **team@netsys.technology **.

8. **RESTRICTED**** CONDUCT**
8. **RESTRICTED** **CONDUCT**

You may not use the Mysterium Platform Open Alpha in any manner that could damage, disable, overburden, or impair the servers and other resources of Network or other Nodes, or interfere with any third party's use of the Mysterium Platform Open Alpha. You may not attempt to gain unauthorized access to any aspect of the Mysterium Platform Open Alpha or to information for which you have not been granted access.

Expand Down
13 changes: 9 additions & 4 deletions bin/client_package/installation/post-uninstall.sh
@@ -1,15 +1,20 @@
#!/bin/bash

function disable_systemd {
printf "Disabling systemd script '/lib/systemd/system/mysterium-client.service'..\n"
system_service=/lib/systemd/system/mysterium-client.service
if [ ! -e $system_service ]; then
return
fi
printf "Disabling systemd script '$system_service'..\n"
systemctl disable mysterium-client
rm -f /lib/systemd/system/mysterium-client.service
rm -f $system_service
}

function disable_update_rcd {
printf "Disabling initd script '/lib/systemd/system/mysterium-client.service'..\n"
initd=/etc/init.d/mysterium-client
printf "Disabling initd script '$initd'..\n"
update-rc.d -f mysterium-client remove
rm -f /etc/init.d/mysterium-client
rm -f $initd
}

function disable_chkconfig {
Expand Down
2 changes: 2 additions & 0 deletions bin/server_package/installation/post-install.sh
@@ -1,5 +1,7 @@
#!/bin/bash

. /usr/share/debconf/confmodule

OS_DIR_BIN="/usr/bin"
OS_DIR_CONFIG="/etc/mysterium-node"
OS_DIR_LOG="/var/log/mysterium-node"
Expand Down
24 changes: 20 additions & 4 deletions bin/server_package/installation/post-uninstall.sh
@@ -1,15 +1,31 @@
#!/bin/bash

if [ "$1" = "purge" ]; then
if [[ -e /usr/share/debconf/confmodule ]]; then
# Source debconf library.
. /usr/share/debconf/confmodule
# Remove my changes to the db.
db_purge
else
printf "confmodule is missing, debconf db data was not purged..\n"
fi
fi

function disable_systemd {
printf "Disabling systemd script '/lib/systemd/system/mysterium-node.service'..\n"
system_service=/lib/systemd/system/mysterium-node.service
if [ ! -e $system_service ]; then
return
fi
printf "Disabling systemd script '$system_service'..\n"
systemctl disable mysterium-node
rm -f /lib/systemd/system/mysterium-node.service
rm -f $system_service
}

function disable_update_rcd {
printf "Disabling initd script '/lib/systemd/system/mysterium-node.service'..\n"
initd=/etc/init.d/mysterium-node
printf "Disabling initd script '$initd'..\n"
update-rc.d -f mysterium-node remove
rm -f /etc/init.d/mysterium-node
rm -f $initd
}

function disable_chkconfig {
Expand Down
25 changes: 25 additions & 0 deletions bin/server_package/installation/pre-install.sh
@@ -0,0 +1,25 @@
#!/bin/sh -e

# Source debconf library.
. /usr/share/debconf/confmodule

db_input critical mysterium/terms || true
db_go

# to reset accepted terms:
# echo RESET mysterium/accept_terms | debconf-communicate mysterium-node
# or:
# NOTE: uncomment below if you need to ask user to accepted updated terms again
# db_fset mysterium/accept_terms seen false

db_input critical mysterium/accept_terms || true
db_go

# Check their answer.
db_get mysterium/accept_terms
if [ "$RET" = "false" ]; then
# terminate installation
echo "You did not accept our terms and conditions. Installation cancelled.\n" >&2
db_purge || true
exit 2
fi
1 change: 1 addition & 0 deletions bin/server_package/installation/systemd.service
Expand Up @@ -11,6 +11,7 @@ Group=mysterium-node

RuntimeDirectory=mysterium-node
RuntimeDirectoryMode=0750
LogsDirectory=mysterium-node

EnvironmentFile=-/etc/default/mysterium-node
ExecStart=/usr/bin/mysterium_server $CONF_DIR $RUN_DIR $DISCOVERY $BROKER $PROTO --agreed-terms-and-conditions
Expand Down
36 changes: 36 additions & 0 deletions bin/server_package/installation/templates
@@ -0,0 +1,36 @@
Template: mysterium/terms
Type: text
Description: You have to accept terms and conditions to install this software
MYSTERIUM NETWORK OPEN ALPHA
TERMS OF USE
FOR MYSTERIUM NODES
SHORT VERSION IN HUMAN LANGUAGE:
.
. Mysterium Platform and Mysterion Software is still in its development
(alpha) stage. We will do our best to develop it further, but we cannot
guarantee this.
.
. You will join our network and act as an exit node for others.
.
. No compensation will be paid to you for your participation in the Program.
.
. We strive to protect you from any legal liability and believe that you
should not be liable for running an exit node, but we cannot guarantee that
you might not face it.
.
. You cannot monitor or log any data which passes through your equipment and
must treat all data equally.
.
. Your use of the platform and software is at your own risk. We provide it to
you "as is" without any warranties.
.
. In no event will we be liable for any damages which you may incur.
.
. We recommend you read the full version to get acquainted with all of the
terms and conditions available here:
https://github.com/MysteriumNetwork/node/blob/master/TERMS.md

Template: mysterium/accept_terms
Type: boolean
Description: Do you accept Terms and Conditions?
In order to install this package you have to accept its terms and conditions
3 changes: 3 additions & 0 deletions bin/server_package_debian
Expand Up @@ -63,6 +63,9 @@ printf "Building Debian package '$PACKAGE_FILE' for architecture '$ARCH' ..\n" \
--depends "iptables" \
--depends "iproute2" \
--depends "sudo" \
--depends "debconf" \
--deb-templates bin/server_package/installation/templates \
--before-install bin/server_package/installation/pre-install.sh \
--after-install bin/server_package/installation/post-install.sh \
--after-remove bin/server_package/installation/post-uninstall.sh \
-s dir -t deb \
Expand Down
2 changes: 1 addition & 1 deletion metadata/terms.go
Expand Up @@ -38,4 +38,4 @@ SHORT VERSION IN HUMAN LANGUAGE:
- In no event will we be liable for any damages which you may incur.
- We recommend you read the full version to get acquainted with all of the
terms and conditions available here:
https://github.com/MysteriumNetwork/node/TERMS.md`
https://github.com/MysteriumNetwork/node/blob/master/TERMS.md`