Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
Cruz committed Dec 23, 2020
0 parents commit 6df1a65
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
31 changes: 31 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

if [[ $UID != 0 ]]; then
echo "Please run this script with sudo:"
echo "sudo $0 $*"
exit 1
fi

pushd /tmp/

curl -s https://api.github.com/repos/chrislusf/seaweedfs/releases/latest \
| grep "browser_download_url.*linux_amd64\.tar\.gz" \
| cut -d : -f 2,3 \
| tr -d \" \
| wget -qi -

tarball="$(find . -name "*linux_amd64.tar.gz")"

tar -xzf $tarball

chmod +x weed

mv weed /usr/local/bin/

popd

location="$(which weed)"
echo "weed binary location: $location"

version="$(weed version)"
echo "weed binary version: $version"
13 changes: 13 additions & 0 deletions seaweed.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=Seaweed Master
After=network.target

[Service]
Type=simple
Restart=on-failure
User=root
ExecStart= weed server -dir={StoragePath} -filer=true
KillSignal=SIGTERM

[Install]
WantedBy=multi-user.target
13 changes: 13 additions & 0 deletions seaweed_mount.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=Seaweed Master
After=network.target

[Service]
Type=simple
Restart=on-failure
User=root
ExecStart= /usr/local/bin/weed mount -filer={MasterHost}:8888 -dir={LocalPath} -filer.path=/
KillSignal=SIGTERM

[Install]
WantedBy=multi-user.target

0 comments on commit 6df1a65

Please sign in to comment.