From 3bd9489a68f8bc6dc96749b7341e48af27534075 Mon Sep 17 00:00:00 2001 From: Horea Christian Date: Sun, 17 May 2015 20:07:51 +0200 Subject: [PATCH] updated syncthing ebuild, analogous to fearedbliss overlay --- net-p2p/syncthing/Manifest | 14 +++++---- net-p2p/syncthing/files/init.d/syncthing | 40 +++++++++++------------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/net-p2p/syncthing/Manifest b/net-p2p/syncthing/Manifest index 4b154c1..b43edd7 100644 --- a/net-p2p/syncthing/Manifest +++ b/net-p2p/syncthing/Manifest @@ -1,7 +1,9 @@ -AUX init.d/syncthing 824 SHA256 9996f5b6690f4b8c887da8c4d5174c77ec9d4eb07e522c2453211bf078ec627b SHA512 331add6916fd4a7acd1cbb8c9ae5c46201abb3bbe2cac224e314f9f26514e9a3d2cfa3d725bb9617cd5feda4589b1be46d466248277f807242b5bb52a7d18c92 WHIRLPOOL 0709a9b5ab1df33b83247a37c9e5bb277d787905263651e8e6a5d204e42a796e48189f6c03b6a243fac8f290ddec50912594b996216b01639e52d2efefb0ac81 -AUX syncthing.service 164 SHA256 5b0e8ca9ae9f81bd621dc7d5dab3788f895052ad2547a83adc41a557c9a48afc SHA512 c412b4ef0337bc98a47e34d92395815cbb3ef3c851dcca39a19432194b77880c205402f4346f8848101356b69121ecb649a6e53a7716a25613027195b7312222 WHIRLPOOL 2e732d518b8593632869750a6b77969bc0464b65488299690a49d3fd4a373f2e78dd308c49687bbf4538ca47881524d0c6272e6b426262d89c1ff9ccdac9db13 -DIST syncthing-0.10.20.tar.gz 3098161 SHA256 e4974c2f44cbd1a4d44f3917e85f47651907ec1054802ad555112f5042e93ac8 SHA512 a5c0848980bd1992e69c0d37b1f65498ab6a90d47b42967564413a158867e6145991310f8e9c6eebda75d37820ee1a8ebef26cfecece5bd3ad9ea6f9392d96f1 WHIRLPOOL 9cf1fc7d5a0c457485df4f74dafa0d989f82717e8e3b8c665615de5e492a860c8b61e6548d16e890cc72780474f2344cf420def192e285adc039127fd90604ba -DIST syncthing-0.10.21.tar.gz 3099017 SHA256 241cc0cd6b87040da8551a1d1964ef7201a9f4679b731d6740592063012b2846 SHA512 4db365114dcdaa05f65ad497bb70bed1c38674a32ef0fb14465a7a045f09ce7ed9599634392046fe4c483ba6bf184fe2d1d7216ecb81cd382fa35b74f1ccdfea WHIRLPOOL 2b6f519584e6241e6b823a1984b0232145843f243a1bcd98a93a526f24eb60253bb2af87b5a62c130f51a4b2264e5cb9828bbd5da9cfe682ab8f715c3211ec8a -EBUILD syncthing-0.10.20.ebuild 1906 SHA256 52734a523bc54cad2dfe939fe85fc08b130b486a37ef703aa5f1534dce60910a SHA512 ed220dc9f3dbec3ba1306e04d573193da862b308c73bd05623408d8db5c61d23847eb688a87862bf1b47c1bdf9e3dc0e2cfe48b467ccffd848bc5af0e251a7b2 WHIRLPOOL a792caa425d3ce075c66545fc3f07fc0e56285a15e2283859fd02df3311fb8347d50a353132686e65f1126fefc0bd677e9e7868008731c1069c5f785de2b5cff -EBUILD syncthing-0.10.21.ebuild 1907 SHA256 2f4e9b1e2967acc4cc066d8f9ffc41f5b9a21321104e3256782776541127f2c7 SHA512 893199ad64da42104d40aed9a1047800616fae5928425c33f1e39ee5dd4765567683bc4165e2a896bfaee5d31e6ed128fd9623f98693932a3728ef6f24e8c6f5 WHIRLPOOL 9f5512ba3ddc290f44e2095822ae55302fe80a7c840f111ae338e8fab4a9b5cc49e4623e0760a1dace4e49e7f2465e464f7edb05c7f6e527a2b170d7e344c3d8 +AUX conf.d/syncthing 484 SHA256 bb6f20906f904dd3cb07df3453a94b105782bb10963abe2862ff6c4b31d5cffb SHA512 849f1aae8b345ee952cccff27ac8364afe2739ec4b6128c7e77794170f4ca60c5ea4a15e7e290fc06e3457c09522695e03662b06c6dd3309748f4a0609338c18 WHIRLPOOL a819d3fcafb9de2b2230a9b899e99adc33a8d7f3bd2ae6ab03717dea18598da3ae57590c9f2ee33b17b93eded3ae6f7b00af9f9c7aacf876d9ab47ac51c6eb65 +AUX init.d/syncthing 848 SHA256 a1ae52a447d45b398c2c7c307f8e336fb41f6b81a373590e3f54755de4aebef5 SHA512 2d1bea328cd4b3f92b3071c6bff3493af6354224b9e39c195cea266d40c2d649fa4da77114e674266626a96e7ab2acc40e0c221603c0f7db1d4b32d03000f994 WHIRLPOOL 61ec40011e86bcbcef5b64faa281daeb74db9b0087023693b832184374c838e3e9829ba45f8c448ecc6ef5a3ef1e201ec494ae8d6eb7584f5072999297b8b6a8 +DIST syncthing-0.10.30.tar.gz 3029635 SHA256 0358f8b5edacebb0eacfad424e2fbca32587b0747c7f7060c63e961038289880 SHA512 c95cfb799609e71dbbcd43aca80652ea2e2e9772020a2716f587a255e351a275b6d60a0ac9ba34c60f661df5a532db956e68e15352ef9188e8322535caf88edb WHIRLPOOL 19771e2baff3f56f1e3575e4a9338bd71c20740dbed67329658b91cfc786385fd490fa1e457b08facca24c5e4598b4659c7ccaa7408c355b9c19eb44f032a738 +DIST syncthing-0.10.31.tar.gz 3040325 SHA256 70362ee35928c2291c4b0659678e768bb9a6462c8e5548df9c37e886e5dfab59 SHA512 83bfa7300bf8d4bbbf5d396c5e3e5be14e5a39ce815e7c6995fb723d779a344f2d1cddaaef3718aea1a6c1cda46f05bfe39d4f395a229c6aa49782c0d5c04055 WHIRLPOOL 4722388a4c6f1253c970b2391343e2444f11e691b439a8099453adbc59b44c29a3afb1a668613f5947b88bf93441313d096e823998d2de148eda2b457562a191 +DIST syncthing-0.11.1.tar.gz 3093628 SHA256 acd644ee8d1ba2568e901ce1dfc0973efb695d185868675e12d472a783c31825 SHA512 b12a591cfcd95cf8c7669ee0409e717d908e1bc8e012b180191dfb7c65af809b4cad500e44f22e6c51f3d247ce46780b3866f5a295ae98719dfc854d6d25ca9e WHIRLPOOL ac578acc85bdf2903dade12fde23e50ff061df11d4ecaccbde2c971679400c79ae749333123f15713e3227f36431e6c9eafd99c5f40bdd0167e5154109bf8280 +EBUILD syncthing-0.10.30.ebuild 1782 SHA256 48ee0926b22abf76dfa301b10dd5e6cf1aba21411eb7043d291fd1edee04c8b4 SHA512 95b236e6e7bc73043e8d3c4ee7dca36fc1101ec5d0258d4315ecffe772b7348fd189e02c2915c8629410fa9e1d0af0e393afca035a0bd808b1287da83cba4c05 WHIRLPOOL 7975127d724ec0c1cf1abcfffefc97d53fe3e41febdee08b5d15998d6d2cf6723829a07386a2df289ada6eef00fabf395208152c2c8e2ca8d32894d384b8e24a +EBUILD syncthing-0.10.31.ebuild 2031 SHA256 88f14e09712b6adc8cddcb7175c89d1bd6c89254b5ed6fc2682236ad3c95ba1c SHA512 aea88b792cb7efbf40a190f02ba19d2decabd4f68919d7f81c592e30bc522611b931e49982188f1d37d062d0a41720c656604c3b1ade29364b4bd96832c65e70 WHIRLPOOL 933f2bed0044f4fe6dd69cbb284f5945d67c552ab14208d23f1850c47f04978a64cd912c9133627782b993a88cf41123c8298644f8145d8f2a1854838e2f4fbc +EBUILD syncthing-0.11.1.ebuild 2009 SHA256 4889721fd3259d85129b909eb88f16c93f2816292c6b710e6ce14f15feeb401f SHA512 2df8db9397591ec62a16aecf0e691ddd746648df66263cba1c4513143b574f3a1727e72219a6e6586b8830623cc1c03b9c6b7a0cf6347295493fb593b4d3ddd5 WHIRLPOOL 44e6f815dac82edc48566a50df7569604ce04b0728cc1d13e08ffe79ad376c4e924afd3fa484ca6c42d72186b55a5646156318584ab04d8cfa9c78906add747e MISC metadata.xml 246 SHA256 1f13fca32620fcc919da81fb9aaa364149cb466bcd86f84f9b20543c3df586b9 SHA512 2e8003ef9d9e5dacc8cb6ebfb7cb6bf605385344fa4db7513aabf1bbf7c7e9052bae47b2faccbd727ccb3d6fb1da9e1881c3d9b711ff23d9d6ed035c0c53f639 WHIRLPOOL 79b333969e70df2668a774d99e5c6c3c6dae462a3c2bc5db4c4f8cbd7adb5d8ea04287d84828353be870d67459b35654e837331938eb920bff5e052d6452c34d diff --git a/net-p2p/syncthing/files/init.d/syncthing b/net-p2p/syncthing/files/init.d/syncthing index 22d70cb..7a2218b 100644 --- a/net-p2p/syncthing/files/init.d/syncthing +++ b/net-p2p/syncthing/files/init.d/syncthing @@ -1,38 +1,36 @@ #!/sbin/runscript -# Copyright 2014 Jonathan Vasquez +# Copyright 2014-2015 Jonathan Vasquez # Distributed under the terms of the GNU General Public License v2 -NAME="SyncThing" -SYNC_NAME="${SYNC_NAME:-syncthing}" -SYNC_PATH="${SYNC_PATH:-/usr/bin}" -SYNC_BINARY="${SYNC_BINARY:-$SYNC_PATH/$SYNC_NAME}" -SYNC_OPTS="${SYNC_OPTS:--home=/etc/$SYNC_NAME}" -SYNC_PIDFILE="${SYNC_PIDFILE:-/var/run/$SYNC_NAME.pid}" +DISPLAY_NAME="SyncThing" + +SYNC_PATH="/usr/bin" +SYNC_BINARY="${SYNC_PATH}/${SYNC_NAME}" +SYNC_USER="${SYNC_USER:-root}" +SYNC_GROUP="${SYNC_GROUP:-root}" +SYNC_HOME="${SYNC_HOME:-/etc/${SYNC_NAME}}" start() { - ebegin "Starting ${NAME}" + ebegin "Starting ${DISPLAY_NAME}" + + if [[ ${SYNC_USER} == "root" ]]; then + SYNC_NAME="root" + SYNC_GROUP="root" + + einfo "Running ${DISPLAY_NAME} as root:root. Home directory: ${SYNC_HOME}" + fi start-stop-daemon -m --pidfile "${SYNC_PIDFILE}" -b \ - --start --exec "${SYNC_BINARY}" -- ${SYNC_OPTS} + --start --user ${SYNC_USER} --group ${SYNC_GROUP} --exec "${SYNC_BINARY}" -- ${SYNC_OPTS} eend $? } stop() { - ebegin "Stopping ${NAME}" + ebegin "Stopping ${DISPLAY_NAME}" - start-stop-daemon --stop --exec "${SYNC_BINARY}" \ - --pidfile "${SYNC_PIDFILE}" - - eend $? -} - -reload() { - ebegin "Reloading ${NAME}" - - start-stop-daemon --signal HUP --exec "${SYNC_BINARY}" \ - --pidfile "${SYNC_PIDFILE}" + start-stop-daemon --stop --exec "${SYNC_BINARY}" --pidfile "${SYNC_PIDFILE}" eend $? }