Advertisement
Guest User

New Script #2

a guest
Oct 6th, 2016
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.58 KB | None | 0 0
  1.  
  2. ~ # cd /opt/etc/init.d
  3. /usr/local/zy-pkgs/opt/etc/init.d # sh -x S80NZBautomator start
  4. + . /opt/etc/autonzb.conf
  5. + SABnzbd=1
  6. + Nzbget=1
  7. + CouchPotato=1
  8. + SickRage=1
  9. + Headphones=0
  10. + Mylar=0
  11. + NzbtoMedia=1
  12. + packageupdate=0
  13. + init=/opt/etc/init.d
  14. + useradmin=/i-data/md0/admin
  15. + configdir=/opt/usr/etc/config
  16. + share=/opt/share
  17. + sabconfig=/opt/usr/etc/config/sabnzbd
  18. + nzbgetconfig=/opt/usr/etc/config/nzbget
  19. + couchconfig=/opt/usr/etc/config/couchpotato
  20. + sickconfig=/opt/usr/etc/config/sickbeard
  21. + headconfig=/opt/usr/etc/config/headphones
  22. + mylarconfig=/opt/usr/etc/config/mylar
  23. + nzbtomedia=/opt/usr/etc/config/nzbToMedia
  24. + python=/opt/bin/python2
  25. + sabdata=/opt/share/sabnzbd
  26. + couchdata=/opt/share/couchpotato
  27. + sickdata=/opt/share/SickRage
  28. + headdata=/opt/share/headphones
  29. + mylardata=/opt/share/mylar
  30. + SABPKG_NAME=SABnzbd
  31. + SABPKG_DIR=/opt/share/couchpotato
  32. + SABCONFIG_DIR=/opt/usr/etc/config/couchpotato
  33. + SABPID_FILE=/opt/usr/etc/config/couchpotato/SABnzbd.pid
  34. + NPKG_NAME=nzbget
  35. + NCONFIG_DIR=/opt/usr/etc/config/nzbget
  36. + NPID_FILE=/opt/usr/etc/config/nzbget/nzbget.lock
  37. + CPKG_NAME=CouchPotato
  38. + CPKG_DIR=/opt/share/couchpotato
  39. + CCONFIG_DIR=/opt/usr/etc/config/couchpotato
  40. + CPID_FILE=/opt/usr/etc/config/couchpotato/CouchPotato.pid
  41. + SPKG_NAME=SickRage
  42. + SPKG_DIR=/opt/share/SickRage
  43. + SCONFIG_DIR=/opt/usr/etc/config/sickbeard
  44. + SPID_FILE=/opt/usr/etc/config/sickbeard/SickRage.pid
  45. + HPKG_NAME=Headphones
  46. + HPKG_DIR=/opt/share/headphones
  47. + HCONFIG_DIR=/opt/usr/etc/config/headphones
  48. + HPID_FILE=/opt/usr/etc/config/headphones/Headphones.pid
  49. + MPKG_NAME=Mylar
  50. + MPKG_DIR=/opt/share/mylar
  51. + MCONFIG_DIR=/opt/usr/etc/config/mylar
  52. + MPID_FILE=/opt/usr/etc/config/mylar/Mylar.pid
  53. + [ 0 == 1 ]
  54. + cd /i-data/md0/admin
  55. + [ ! -d /i-data/md0/admin/download/incomplete ]
  56. + [ 1 == 1 ]
  57. + [ ! -f /opt/bin/nzbget ]
  58. + [ 0 == 1 ]
  59. + [ 1 == 1 ]
  60. + [ -f /opt/share/sabnzbd/SABnzbd.py ]
  61. + git clone https://github.com/sabnzbd/sabnzbd -b master /opt/share/sabnzbd
  62. Cloning into '/opt/share/sabnzbd'...
  63. remote: Counting objects: 45199, done.
  64. remote: Compressing objects: 100% (180/180), done.
  65. remote: Total 45199 (delta 95), reused 0 (delta 0), pack-reused 45019
  66. Receiving objects: 100% (45199/45199), 94.79 MiB | 1.39 MiB/s, done.
  67. Resolving deltas: 100% (30521/30521), done.
  68. Checking connectivity... done.
  69. + mkdir -p -m 777 /opt/usr/etc/config/sabnzbd
  70. + mkdir -p -m 777 /opt/usr/etc/config/sabnzbd
  71. + sleep 2
  72. + [ 1 == 1 ]
  73. + [ -d /opt/share/couchpotato ]
  74. + cd /opt/share/couchpotato
  75. + git pull https://github.com/RuudBurger/CouchPotatoServer
  76. From https://github.com/RuudBurger/CouchPotatoServer
  77. * branch HEAD -> FETCH_HEAD
  78. Already up-to-date.
  79. + [ 1 == 1 ]
  80. + [ -d /opt/share/SickRage ]
  81. + cd /opt/share/SickRage
  82. + git pull https://github.com/SickRage/SickRage.git
  83. From https://github.com/SickRage/SickRage
  84. * branch HEAD -> FETCH_HEAD
  85. Already up-to-date.
  86. + [ 0 == 1 ]
  87. + [ 0 == 1 ]
  88. + [ 1 == 1 ]
  89. + [ -d /opt/usr/etc/config/nzbToMedia ]
  90. + cd /opt/usr/etc/config/nzbToMedia
  91. + git pull https://github.com/clinton-hall/nzbToMedia.git
  92. From https://github.com/clinton-hall/nzbToMedia
  93. * branch HEAD -> FETCH_HEAD
  94. Already up-to-date.
  95. + [ 1 == 1 ]
  96. + [ -f /opt/usr/etc/config/couchpotato/SABnzbd.pid ]
  97. + sleep 2
  98. + [ -f /opt/usr/etc/config/sabnzbd/sabnzbd.ini ]
  99. + PYTHON_EGG_CACHE=/tmp /opt/bin/python2 /opt/share/sabnzbd/SABnzbd.py -b 0 -d --pidfile $SABPID_FILE -f $sabconfig/sabnzbd.ini
  100. + [ 1 == 1 ]
  101. + sh /opt/etc/init.d/S75nzbget stop
  102. Checking nzbget... alive.
  103. Shutting down nzbget... done.
  104. + sleep 2
  105. + [ 0 == 1 ]
  106. + sleep 2
  107. + sh /opt/etc/init.d/S75nzbget start
  108. Starting nzbget... done.
  109. + sleep 2
  110. + [ 1 == 1 ]
  111. + [ -f /opt/usr/etc/config/couchpotato/CouchPotato.pid ]
  112. + /bin/cat /opt/usr/etc/config/couchpotato/CouchPotato.pid
  113. + Pid=23541
  114. + i=0
  115. + kill 23541
  116. + echo -n Waiting for CouchPotato to shut down:
  117. Waiting for CouchPotato to shut down: + [ -d /proc/23541 ]
  118. + sleep 1
  119. + let i+=1
  120. + /bin/echo -n 1,
  121. 1, + [ 1 = 45 ]
  122. + [ -d /proc/23541 ]
  123. + rm -f /opt/usr/etc/config/couchpotato/CouchPotato.pid
  124. + echo CouchPotato Shutdown
  125. CouchPotato Shutdown
  126. + sleep 2
  127. + /opt/bin/python2 /opt/share/couchpotato/CouchPotato.py --daemon --data_dir /opt/usr/etc/config/couchpotato --config /opt/usr/etc/config/couchpotato/settings.conf --pid_file /opt/usr/etc/config/couchpotato/CouchPotato.pid
  128. + echo -n CouchPotato Started
  129. CouchPotato Started + sleep 2
  130. + [ 1 == 1 ]
  131. + [ -f /opt/usr/etc/config/sickbeard/SickRage.pid ]
  132. + /bin/cat /opt/usr/etc/config/sickbeard/SickRage.pid
  133. + Pid=23724
  134. + i=0
  135. + kill 23724
  136. + echo -n Waiting for SickRage to shut down:
  137. Waiting for SickRage to shut down: + [ -d /proc/23724 ]
  138. + sleep 1
  139. + let i+=1
  140. + /bin/echo -n 1,
  141. 1, + [ 1 = 45 ]
  142. + [ -d /proc/23724 ]
  143. + sleep 1
  144. + let i+=1
  145. + /bin/echo -n 2,
  146. 2, + [ 2 = 45 ]
  147. + [ -d /proc/23724 ]
  148. + sleep 1
  149. + let i+=1
  150. + /bin/echo -n 3,
  151. 3, + [ 3 = 45 ]
  152. + [ -d /proc/23724 ]
  153. + sleep 1
  154. + let i+=1
  155. + /bin/echo -n 4,
  156. 4, + [ 4 = 45 ]
  157. + [ -d /proc/23724 ]
  158. + rm -f /opt/usr/etc/config/sickbeard/SickRage.pid
  159. + echo SickRage Shutdown
  160. SickRage Shutdown
  161. + sleep 2
  162. + /opt/bin/python2 /opt/share/SickRage/SickBeard.py --datadir /opt/usr/etc/config/sickbeard --config /opt/usr/etc/config/sickbeard/config.ini -d --pidfile /opt/usr/etc/config/sickbeard/SickRage.pid
  163. + echo -n SickRage Started
  164. SickRage Started + sleep 2
  165. + [ 0 == 1 ]
  166. + echo Headphones not Installed
  167. Headphones not Installed
  168. + sleep 2
  169. + [ 0 == 1 ]
  170. + echo Mylar not Installed
  171. Mylar not Installed
  172. /usr/local/zy-pkgs/opt/etc/init.d # mc
  173.  
  174. /usr/local/zy-pkgs/opt/etc/init.d # sh -x S80NZBautomator start
  175. + . /opt/etc/autonzb.conf
  176. + SABnzbd=1
  177. + Nzbget=1
  178. + CouchPotato=1
  179. + SickRage=1
  180. + Headphones=1
  181. + Mylar=0
  182. + NzbtoMedia=1
  183. + packageupdate=0
  184. + init=/opt/etc/init.d
  185. + useradmin=/i-data/md0/admin
  186. + configdir=/opt/usr/etc/config
  187. + share=/opt/share
  188. + sabconfig=/opt/usr/etc/config/sabnzbd
  189. + nzbgetconfig=/opt/usr/etc/config/nzbget
  190. + couchconfig=/opt/usr/etc/config/couchpotato
  191. + sickconfig=/opt/usr/etc/config/sickbeard
  192. + headconfig=/opt/usr/etc/config/headphones
  193. + mylarconfig=/opt/usr/etc/config/mylar
  194. + nzbtomedia=/opt/usr/etc/config/nzbToMedia
  195. + python=/opt/bin/python2
  196. + sabdata=/opt/share/sabnzbd
  197. + couchdata=/opt/share/couchpotato
  198. + sickdata=/opt/share/SickRage
  199. + headdata=/opt/share/headphones
  200. + mylardata=/opt/share/mylar
  201. + SABPKG_NAME=SABnzbd
  202. + SABPKG_DIR=/opt/share/couchpotato
  203. + SABCONFIG_DIR=/opt/usr/etc/config/couchpotato
  204. + SABPID_FILE=/opt/usr/etc/config/couchpotato/SABnzbd.pid
  205. + NPKG_NAME=nzbget
  206. + NCONFIG_DIR=/opt/usr/etc/config/nzbget
  207. + NPID_FILE=/opt/usr/etc/config/nzbget/nzbget.lock
  208. + CPKG_NAME=CouchPotato
  209. + CPKG_DIR=/opt/share/couchpotato
  210. + CCONFIG_DIR=/opt/usr/etc/config/couchpotato
  211. + CPID_FILE=/opt/usr/etc/config/couchpotato/CouchPotato.pid
  212. + SPKG_NAME=SickRage
  213. + SPKG_DIR=/opt/share/SickRage
  214. + SCONFIG_DIR=/opt/usr/etc/config/sickbeard
  215. + SPID_FILE=/opt/usr/etc/config/sickbeard/SickRage.pid
  216. + HPKG_NAME=Headphones
  217. + HPKG_DIR=/opt/share/headphones
  218. + HCONFIG_DIR=/opt/usr/etc/config/headphones
  219. + HPID_FILE=/opt/usr/etc/config/headphones/Headphones.pid
  220. + MPKG_NAME=Mylar
  221. + MPKG_DIR=/opt/share/mylar
  222. + MCONFIG_DIR=/opt/usr/etc/config/mylar
  223. + MPID_FILE=/opt/usr/etc/config/mylar/Mylar.pid
  224. + [ 0 == 1 ]
  225. + cd /i-data/md0/admin
  226. + [ ! -d /i-data/md0/admin/download/incomplete ]
  227. + [ 1 == 1 ]
  228. + [ ! -f /opt/bin/nzbget ]
  229. + [ 0 == 1 ]
  230. + [ 1 == 1 ]
  231. + [ -f /opt/share/sabnzbd/SABnzbd.py ]
  232. + git clone https://github.com/sabnzbd/sabnzbd -b master /opt/share/sabnzbd
  233. Cloning into '/opt/share/sabnzbd'...
  234. remote: Counting objects: 45199, done.
  235. remote: Compressing objects: 100% (180/180), done.
  236. remote: Total 45199 (delta 95), reused 0 (delta 0), pack-reused 45019
  237. Receiving objects: 100% (45199/45199), 94.79 MiB | 1.76 MiB/s, done.
  238. Resolving deltas: 100% (30521/30521), done.
  239. Checking connectivity... done.
  240. + mkdir -p -m 777 /opt/usr/etc/config/sabnzbd
  241. + mkdir -p -m 777 /opt/usr/etc/config/sabnzbd
  242. + sleep 2
  243. + [ 1 == 1 ]
  244. + [ -d /opt/share/couchpotato ]
  245. + cd /opt/share/couchpotato
  246. + git pull https://github.com/RuudBurger/CouchPotatoServer
  247. From https://github.com/RuudBurger/CouchPotatoServer
  248. * branch HEAD -> FETCH_HEAD
  249. Already up-to-date.
  250. + [ 1 == 1 ]
  251. + [ -d /opt/share/SickRage ]
  252. + cd /opt/share/SickRage
  253. + git pull https://github.com/SickRage/SickRage.git
  254. From https://github.com/SickRage/SickRage
  255. * branch HEAD -> FETCH_HEAD
  256. Already up-to-date.
  257. + [ 1 == 1 ]
  258. + [ -d /opt/share/headphones ]
  259. + cd /opt/share/headphones
  260. + git pull https://github.com/rembo10/headphones.git
  261. From https://github.com/rembo10/headphones
  262. * branch HEAD -> FETCH_HEAD
  263. Already up-to-date.
  264. + [ 0 == 1 ]
  265. + [ 1 == 1 ]
  266. + [ -d /opt/usr/etc/config/nzbToMedia ]
  267. + cd /opt/usr/etc/config/nzbToMedia
  268. + git pull https://github.com/clinton-hall/nzbToMedia.git
  269. From https://github.com/clinton-hall/nzbToMedia
  270. * branch HEAD -> FETCH_HEAD
  271. Already up-to-date.
  272. + [ 1 == 1 ]
  273. + [ -f /opt/usr/etc/config/couchpotato/SABnzbd.pid ]
  274. + sleep 2
  275. + [ -f /opt/usr/etc/config/sabnzbd/sabnzbd.ini ]
  276. + PYTHON_EGG_CACHE=/tmp /opt/bin/python2 /opt/share/sabnzbd/SABnzbd.py -b 0 -d --pidfile $SABPID_FILE -f $sabconfig/sabnzbd.ini
  277. + [ 1 == 1 ]
  278. + sh /opt/etc/init.d/S75nzbget stop
  279. Checking nzbget... alive.
  280. Shutting down nzbget... done.
  281. + sleep 2
  282. + [ 0 == 1 ]
  283. + sleep 2
  284. + sh /opt/etc/init.d/S75nzbget start
  285. Starting nzbget... done.
  286. + sleep 2
  287. + [ 1 == 1 ]
  288. + [ -f /opt/usr/etc/config/couchpotato/CouchPotato.pid ]
  289. + /bin/cat /opt/usr/etc/config/couchpotato/CouchPotato.pid
  290. + Pid=8864
  291. + i=0
  292. + kill 8864
  293. + echo -n Waiting for CouchPotato to shut down:
  294. Waiting for CouchPotato to shut down: + [ -d /proc/8864 ]
  295. + sleep 1
  296. + let i+=1
  297. + /bin/echo -n 1,
  298. 1, + [ 1 = 45 ]
  299. + [ -d /proc/8864 ]
  300. + rm -f /opt/usr/etc/config/couchpotato/CouchPotato.pid
  301. + echo CouchPotato Shutdown
  302. CouchPotato Shutdown
  303. + sleep 2
  304. + /opt/bin/python2 /opt/share/couchpotato/CouchPotato.py --daemon --data_dir /opt/usr/etc/config/couchpotato --config /opt/usr/etc/config/couchpotato/settings.conf --pid_file /opt/usr/etc/config/couchpotato/CouchPotato.pid
  305. + echo -n CouchPotato Started
  306. CouchPotato Started + sleep 2
  307. + [ 1 == 1 ]
  308. + [ -f /opt/usr/etc/config/sickbeard/SickRage.pid ]
  309. + /bin/cat /opt/usr/etc/config/sickbeard/SickRage.pid
  310. + Pid=9035
  311. + i=0
  312. + kill 9035
  313. + echo -n Waiting for SickRage to shut down:
  314. Waiting for SickRage to shut down: + [ -d /proc/9035 ]
  315. + sleep 1
  316. + let i+=1
  317. + /bin/echo -n 1,
  318. 1, + [ 1 = 45 ]
  319. + [ -d /proc/9035 ]
  320. + sleep 1
  321. + let i+=1
  322. + /bin/echo -n 2,
  323. 2, + [ 2 = 45 ]
  324. + [ -d /proc/9035 ]
  325. + sleep 1
  326. + let i+=1
  327. + /bin/echo -n 3,
  328. 3, + [ 3 = 45 ]
  329. + [ -d /proc/9035 ]
  330. + sleep 1
  331. + let i+=1
  332. + /bin/echo -n 4,
  333. 4, + [ 4 = 45 ]
  334. + [ -d /proc/9035 ]
  335. + sleep 1
  336. + let i+=1
  337. + /bin/echo -n 5,
  338. 5, + [ 5 = 45 ]
  339. + [ -d /proc/9035 ]
  340. + rm -f /opt/usr/etc/config/sickbeard/SickRage.pid
  341. + echo SickRage Shutdown
  342. SickRage Shutdown
  343. + sleep 2
  344. + /opt/bin/python2 /opt/share/SickRage/SickBeard.py --datadir /opt/usr/etc/config/sickbeard --config /opt/usr/etc/config/sickbeard/config.ini -d --pidfile /opt/usr/etc/config/sickbeard/SickRage.pid
  345. + echo -n SickRage Started
  346. SickRage Started + sleep 2
  347. + [ 1 == 1 ]
  348. + [ -f /opt/usr/etc/config/headphones/Headphones.pid ]
  349. + sleep 2
  350. + /opt/bin/python2 /opt/share/headphones/Headphones.py --datadir /opt/usr/etc/config/headphones -d --pidfile /opt/usr/etc/config/headphones/Headphones.pid
  351. + echo -n Headphones Started
  352. Headphones Started + sleep 2
  353. + [ 0 == 1 ]
  354. + echo Mylar not Installed
  355. Mylar not Installed
  356. /usr/local/zy-pkgs/opt/etc/init.d #
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement