diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2016-05-04 13:13:39 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2016-05-04 13:13:43 +0000 |
commit | ed7b203f73102e2e15ee629c12aad42b682d4a9c (patch) | |
tree | 5a40e144cd70bf70277639c38d62ff5dbbfbcaf9 /testing/kiwiirc/kiwilauncher.patch | |
parent | 600ae0872414197129bfe26f27e6264e339f6d07 (diff) | |
download | aports-ed7b203f73102e2e15ee629c12aad42b682d4a9c.tar.bz2 aports-ed7b203f73102e2e15ee629c12aad42b682d4a9c.tar.xz |
testing/kiwiirc: new aport
Diffstat (limited to 'testing/kiwiirc/kiwilauncher.patch')
-rw-r--r-- | testing/kiwiirc/kiwilauncher.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/testing/kiwiirc/kiwilauncher.patch b/testing/kiwiirc/kiwilauncher.patch new file mode 100644 index 0000000000..cdc8545963 --- /dev/null +++ b/testing/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, |