Add Western Digital apkg build scripts

This commit is contained in:
Joseph Henry 2022-04-25 17:47:58 -07:00
commit acd1f24a3f
No known key found for this signature in database
GPG key ID: C45B33FF5EBC9344
15 changed files with 280 additions and 0 deletions

21
pkg/wd/zerotier/apkg.rc Normal file
View file

@ -0,0 +1,21 @@
Package: zerotier
Section: Apps
Version: 1.8.8
Packager: ZeroTier, Inc.
Email: contact@zerotier.com
Homepage: http://www.zerotier.com
Description: Securely connect any device, anywhere.
AddonShowName: ZeroTier
Icon: zerotier.png
AddonIndexPage: index.html
AddonUsedPort: 9993
InstDepend:
InstConflict:
StartDepend:
StartConflict:
CenterType:1
UserControl:0
MinFWVer:
MaxFWVer:
IndividualFlag:

37
pkg/wd/zerotier/apkg.xml Normal file
View file

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<config>
<apkg>
<item>
<procudt_id>0</procudt_id>
<custom_id>20</custom_id>
<model_id>8</model_id>
<app_id>11</app_id>
<user_control>0</user_control>
<center_type>1</center_type>
<individual_flag>0</individual_flag>
<name>zerotier</name>
<show>ZeroTier</show>
<enable>1</enable>
<version>1.8.8</version>
<date>20220425</date>
<inst_date/>
<path/>
<ps_name/>
<url>index.html</url>
<url_port>9993</url_port>
<apkg_version>2</apkg_version>
<packager>ZeroTier, Inc.</packager>
<email>contact@zerotier.com</email>
<homepage>http://www.zerotier.com</homepage>
<inst_depend/>
<inst_conflict/>
<start_depend/>
<start_conflict/>
<description>Securely connect any device, anywhere.</description>
<icon>zerotier.png</icon>
<MinFWVer/>
<MaxFWVer/>
<Hidden/>
</item>
</apkg>
</config>

7
pkg/wd/zerotier/clean.sh Executable file
View file

@ -0,0 +1,7 @@
#!/bin/sh
rm -f /usr/bin/zerotier-one 2> /dev/null
rm -f /usr/sbin/zerotier-one 2> /dev/null
rm -f /usr/bin/zerotier-cli 2> /dev/null
rm -f /usr/sbin/zerotier-cli 2> /dev/null

15
pkg/wd/zerotier/init.sh Executable file
View file

@ -0,0 +1,15 @@
#!/bin/sh
install_path=$1
ln -s $install_path/bin/zerotier-one /usr/sbin/zerotier-one
ln -s $install_path/bin/zerotier-one /usr/sbin/zerotier-cli
ln -s $install_path/bin/zerotier-one /usr/bin/zerotier-one
ln -s $install_path/bin/zerotier-one /usr/bin/zerotier-cli
ln -s $install_path/ /var/lib/zerotier-one
APKG_PATH=$(readlink -f $1)
WEBPATH="/var/www/apps/zerotier/"
mkdir -p $WEBPATH
ln -sf ${APKG_PATH}/web/* $WEBPATH

5
pkg/wd/zerotier/install.sh Executable file
View file

@ -0,0 +1,5 @@
#!/bin/sh
path_src=$1
path_des=$2
mv $path_src $path_des

1
pkg/wd/zerotier/preinst.sh Executable file
View file

@ -0,0 +1 @@
#!/bin/sh

10
pkg/wd/zerotier/remove.sh Executable file
View file

@ -0,0 +1,10 @@
#!/bin/sh
path=$1
rm -f /usr/bin/zerotier-one 2> /dev/null
rm -f /usr/sbin/zerotier-one 2> /dev/null
rm -f /usr/bin/zerotier-cli 2> /dev/null
rm -f /usr/sbin/zerotier-cli 2> /dev/null
rm -rf $path

3
pkg/wd/zerotier/start.sh Executable file
View file

@ -0,0 +1,3 @@
#! /bin/sh
/usr/bin/zerotier-one -d

3
pkg/wd/zerotier/stop.sh Executable file
View file

@ -0,0 +1,3 @@
#! /bin/sh
killall zerotier-one

View file

@ -0,0 +1,58 @@
<div class="header">
<h2 id="zerotier">ZeroTier</h2>
</div>
<p>Welcome! ZeroTier is a peer-to-peer encrypted virtual networking solution that enables you to create Local Area Networks with static IP assignments for all of your devices. Access your NAS from anywhere in the world with a single IP and without the need of cloud services backhauling your traffic. To use the CLI:</p>
<h2 id="using-the-cli-via-ssh-">Using the CLI via SSH:</h2>
<ol>
<li><p>Using your (sshd) account, enable SSH:</p>
<ul>
<li><strong><code>Settings</code></strong> -&gt; <strong><code>Network</code></strong> -&gt; <strong><code>SSH</code></strong></li>
</ul>
</li>
<li><p>From a computer, open a terminal and SSH into your NAS device:</p>
<ul>
<li><strong><code>ssh sshd@your_nas_device_lan_ip</code></strong></li>
</ul>
</li>
<li><p>Create account and network ID at <a href="https://my.zerotier.com">my.zerotier.com</a></p>
<ul>
<li><em>Note: This account is merely to administer your network. Your traffic is not handled by ZeroTier except in the case where a direct connection cannot be established. This is a courtesy service we offer for free that you can disable if you&#39;d like. In any case, your traffic is <a href="https://www.zerotier.com/manual/#2_1_3">fully encrypted</a> end-to-end.</em></li>
</ul>
</li>
<li><p>Join your device to the network:</p>
<ul>
<li><strong><code>zerotier-cli join your_network_id</code></strong></li>
</ul>
</li>
<li><p>Use <a href="https://my.zerotier.com">my.zerotier.com</a> to authorize your NAS device to join your network.</p>
</li>
</ol>
<h2 id="help-and-support-in-order-of-relevance-">Help and support (in order of relevance)</h2>
<ul>
<li>Github Repository: <a href="https://github.com/zerotier/ZeroTierNAS/issues">https://github.com/zerotier/ZeroTierNAS</a></li>
<li>Forums: <a href="https://discuss.zerotier.com">https://discuss.zerotier.com</a></li>
<li>Contact: <a href="mailto:contact@zerotier.com">contact@zerotier.com</a></li>
</ul>
<div class="footer">
<h2 id="zerotier"><h2>
</div>
<style>
.header {
padding: 1px;
text-align: center;
background: #F2B464;
color: black;
font-size: 30px;
}
.footer {
padding: 1px;
text-align: center;
background: #F2B464;
color: black;
font-size: 30px;
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB