From e088a8c3ff22d240850e327840c32686ea4b79fa Mon Sep 17 00:00:00 2001 From: maxice8 Date: Sun, 27 Jan 2019 09:35:14 -0200 Subject: [PATCH] PopCorn: create /etc/popcorn only on make_dirs for #660 --- srcpkgs/PopCorn/files/popcorn/conf | 2 -- srcpkgs/PopCorn/files/popcorn/run | 5 +++-- srcpkgs/PopCorn/files/pqueryd/conf | 2 -- srcpkgs/PopCorn/files/pqueryd/run | 3 +++ srcpkgs/PopCorn/files/statrepo/conf | 2 -- srcpkgs/PopCorn/files/statrepo/run | 3 +++ srcpkgs/PopCorn/template | 11 +++++------ 7 files changed, 14 insertions(+), 14 deletions(-) delete mode 100644 srcpkgs/PopCorn/files/popcorn/conf mode change 100755 => 100644 srcpkgs/PopCorn/files/popcorn/run delete mode 100644 srcpkgs/PopCorn/files/pqueryd/conf delete mode 100644 srcpkgs/PopCorn/files/statrepo/conf mode change 100755 => 100644 srcpkgs/PopCorn/files/statrepo/run diff --git a/srcpkgs/PopCorn/files/popcorn/conf b/srcpkgs/PopCorn/files/popcorn/conf deleted file mode 100644 index ac2813fe9d..0000000000 --- a/srcpkgs/PopCorn/files/popcorn/conf +++ /dev/null @@ -1,2 +0,0 @@ -SERVER=popcorn.voidlinux.org -PORT=8001 diff --git a/srcpkgs/PopCorn/files/popcorn/run b/srcpkgs/PopCorn/files/popcorn/run old mode 100755 new mode 100644 index 67648e0744..59e740ed93 --- a/srcpkgs/PopCorn/files/popcorn/run +++ b/srcpkgs/PopCorn/files/popcorn/run @@ -2,7 +2,8 @@ [ -r ./conf ] && . ./conf -mkdir -p /etc/popcorn -chown -R _popcorn:_popcorn /etc/popcorn +: ${SERVER:=popcorn.voidlinux.org} +: ${PORT:=8001} + chpst -u _popcorn:_popcorn popcorn --server $SERVER --port $PORT exec chpst -u _popcorn:_popcorn snooze popcorn --server $SERVER --port $PORT diff --git a/srcpkgs/PopCorn/files/pqueryd/conf b/srcpkgs/PopCorn/files/pqueryd/conf deleted file mode 100644 index 0f04bde90b..0000000000 --- a/srcpkgs/PopCorn/files/pqueryd/conf +++ /dev/null @@ -1,2 +0,0 @@ -PORT=8002 -DATA_DIR=/srv/www/popcorn/ diff --git a/srcpkgs/PopCorn/files/pqueryd/run b/srcpkgs/PopCorn/files/pqueryd/run index 876bd1b806..b413a58cf1 100644 --- a/srcpkgs/PopCorn/files/pqueryd/run +++ b/srcpkgs/PopCorn/files/pqueryd/run @@ -2,4 +2,7 @@ [ -r ./conf ] && . ./conf +: ${PORT=8002} +: ${DATA_DIR=/srv/www/popcorn} + exec chpst -u _popcorn:_popcorn pqueryd --checkpoint_enabled=false --port $PORT --data_dir $DATA_DIR diff --git a/srcpkgs/PopCorn/files/statrepo/conf b/srcpkgs/PopCorn/files/statrepo/conf deleted file mode 100644 index ac6c6963bb..0000000000 --- a/srcpkgs/PopCorn/files/statrepo/conf +++ /dev/null @@ -1,2 +0,0 @@ -PORT=8001 -KEY=RESET_KEY diff --git a/srcpkgs/PopCorn/files/statrepo/run b/srcpkgs/PopCorn/files/statrepo/run old mode 100755 new mode 100644 index 39f25cce21..05c15baf1b --- a/srcpkgs/PopCorn/files/statrepo/run +++ b/srcpkgs/PopCorn/files/statrepo/run @@ -2,4 +2,7 @@ [ -r ./conf ] && . ./conf +: ${PORT=8001} +: ${KEY=RESET_KEY} + exec chpst -u _popcorn:_popcorn statrepo --port $PORT --reset_key $KEY diff --git a/srcpkgs/PopCorn/template b/srcpkgs/PopCorn/template index 6c8aabdd36..06da363399 100644 --- a/srcpkgs/PopCorn/template +++ b/srcpkgs/PopCorn/template @@ -1,9 +1,9 @@ # Template file for 'PopCorn' pkgname=PopCorn version=0.3 -revision=3 +revision=4 build_style=go -go_import_path="github.com/the-maldridge/popcorn" +go_import_path=github.com/the-maldridge/popcorn go_package="${go_import_path}/cmd/popcorn ${go_import_path}/cmd/popcornctl ${go_import_path}/cmd/statrepo @@ -19,9 +19,9 @@ checksum=5e61970c3ba5fd83f6b5b86c30264213461f4a5af8aacd2ba1757333ece05260 system_accounts="_popcorn" _popcorn_homedir="/var/lib/popcorn" -make_dirs="/var/lib/popcorn 0755 _popcorn _popcorn +make_dirs=" + /var/lib/popcorn 0755 _popcorn _popcorn /etc/popcorn 0755 _popcorn _popcorn" -conf_files="/etc/sv/popcorn/conf" pre_build() { cd $GOSRCPATH @@ -39,8 +39,7 @@ post_install() { PopCorn-Server_package() { short_desc+=" - Server" depends="${sourcepkg}>=${version}_${revision}" - conf_files="/etc/sv/statrepo/conf - /etc/sv/pqueryd/conf" + make_dirs="/srv/www/popcorn 0755 _popcorn _popcorn" pkg_install() { vmove usr/bin/statrepo vmove usr/bin/popcornctl