aboutsummaryrefslogtreecommitdiffstats
path: root/community/kiwiirc/kiwilauncher.patch
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2016-08-25 08:11:29 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2016-08-25 08:11:29 +0000
commit0ba8cd0b26bc79feb0bc87fac61255a40eec17d5 (patch)
tree0d9e9616daef2cb81b9e1991d787c3f5d438cb10 /community/kiwiirc/kiwilauncher.patch
parent0109f4afea388776366a44bb309b0f1af75affb7 (diff)
downloadaports-0ba8cd0b26bc79feb0bc87fac61255a40eec17d5.tar.bz2
aports-0ba8cd0b26bc79feb0bc87fac61255a40eec17d5.tar.xz
community/kiwiirc: moved from testing
Diffstat (limited to 'community/kiwiirc/kiwilauncher.patch')
-rw-r--r--community/kiwiirc/kiwilauncher.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/community/kiwiirc/kiwilauncher.patch b/community/kiwiirc/kiwilauncher.patch
new file mode 100644
index 0000000000..cdc8545963
--- /dev/null
+++ b/community/kiwiirc/kiwilauncher.patch
@@ -0,0 +1,24 @@
+index a1f1208..47770b6 100644
+--- a/server/helpers/launcher.js
++++ b/server/helpers/launcher.js
+@@ -1,5 +1,5 @@
+ var kiwi_app = '../kiwi.js';
+-var pidfile = '../../kiwiirc.pid';
++var pidfile = '/run/kiwiirc/kiwiirc.pid';
+ var pidfile_arg;
+
+ // Check if a pidfile has been set as an argument
+@@ -16,6 +16,13 @@ if (process.argv.indexOf('-p') > -1) {
+ }
+ }
+
++try {
++ process.setgid('kiwiirc');
++ process.setuid('kiwiirc');
++} catch (e) {
++ console.error('Cannot switch to user kiwiirc. Try running as root.')
++ process.exit();
++}
+
+ var daemon = require('daemonize2').setup({
+ main: kiwi_app,