diff options
author | Henrique Mayer | 2021-08-25 18:55:12 -0300 |
---|---|---|
committer | Henrique Mayer | 2021-08-25 18:55:12 -0300 |
commit | 815d27fac388608a73e8f2f29a32916ed4288fdb (patch) | |
tree | b55c69798e3c5a3ff9933b798f76cd45bacfca69 | |
download | aur-815d27fac388608a73e8f2f29a32916ed4288fdb.tar.gz |
created PKGBUILD
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | LICENSE | 20 | ||||
-rw-r--r-- | PKGBUILD | 24 | ||||
-rw-r--r-- | milvus.install | 57 |
4 files changed, 123 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..e6bee37571cb --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = milvus + pkgdesc = Agente Milvus Helpdesk para Linux. + pkgver = 10.0.0 + pkgrel = 1 + url = https://milvus.com.br + install = milvus.install + arch = x86_64 + license = custom + makedepends = debtap + depends = python-netifaces + depends = python-dmidecode + depends = python-apt + depends = python-psutil + depends = python-requests + depends = python-daemon + depends = gconf + options = !strip + options = !emptydirs + source_x86_64 = http://update.milvus.com.br/linux/x64/milvus.deb + sha512sums_x86_64 = f3eb28af52ef75c9934a66db39e0aded7bfd3ccdcd9539f35313f6b2a8c4b67bdccaa333b40506b2d86c743e3f7978e16a9697ee7a96c81b7a0d42e1c2c59cb0 + +pkgname = milvus diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000000..7a40eacafdf9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2013-2018 GitHub Inc. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..cf889e34e029 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,24 @@ +# Generated by debtap +# Maintainer: Henrique Mayer <hmayer at gmail dot com> +pkgname=milvus +pkgver=10.0.0 +pkgrel=1 +pkgdesc="Agente Milvus Helpdesk para Linux." +arch=('x86_64') +depends=('python-netifaces' 'python-dmidecode' 'python-apt' 'python-psutil' 'python-requests' 'python-daemon' 'gconf') +makedepends=('debtap') +url="https://milvus.com.br" +license=('custom') +options=('!strip' '!emptydirs') +install=${pkgname}.install +source_x86_64=("http://update.milvus.com.br/linux/x64/milvus.deb") +sha512sums_x86_64=('f3eb28af52ef75c9934a66db39e0aded7bfd3ccdcd9539f35313f6b2a8c4b67bdccaa333b40506b2d86c743e3f7978e16a9697ee7a96c81b7a0d42e1c2c59cb0') + +package(){ + + # Extract package data + tar xf data.tar.xz -C "${pkgdir}" + + install -D -m644 "${startdir}/pkg/${pkgname}/usr/share/milvus/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + +} diff --git a/milvus.install b/milvus.install new file mode 100644 index 000000000000..709d550cd9c3 --- /dev/null +++ b/milvus.install @@ -0,0 +1,57 @@ +post_install() { + + TOKEN=/usr/share/milvus/config/configMilvus.txt + + mkdir -p /usr/share/milvus/config + chmod -R 777 /usr/share/milvus/config + chmod -R 777 /usr/share/milvus/resources/scripts + chmod 755 /usr/share/milvus/resources/scripts/service.sh + rm -rf /usr/share/milvus/resources/scripts/milvus.deb + + { + sudo -u "$USER" /usr/share/milvus/milvus & + } || { + echo "Erro ao iniciar servico" + } + + if [ -f "$TOKEN" ]; then + { + sudo cp /usr/share/milvus/resources/scripts/milvus.service /etc/systemd/system/ + sudo systemctl daemon-reload + } || { + echo "Erro ao iniciar servico" + } + fi + + if [ -f "$TOKEN" ]; then + { + sudo service milvus start + } || { + echo "Erro ao iniciar servico" + } + fi + +} + +post_upgrade() { + post_install +} + +pre_remove() { + + { + AGENTDID=`(ps ax | grep 'agentd.py' | grep 'start' | grep -v grep | awk '{ print $1 }')` + sudo kill $AGENTDID + echo "Servico parado" + } || { + echo "Erro ao parar servico" + } + + { + sudo killall milvus + echo "Agente parado" + } || { + echo "Erro ao parar agente" + } + +} |