diff options
-rwxr-xr-x | init-script | 16 | ||||
-rw-r--r-- | package.json | 4 | ||||
-rw-r--r-- | pnpm-lock.yaml | 9 |
3 files changed, 19 insertions, 10 deletions
diff --git a/init-script b/init-script index 6dba4f0..b87965e 100755 --- a/init-script +++ b/init-script @@ -1,12 +1,16 @@ #!/sbin/openrc-run -thisdir="$(dirname "$(readlink -f "$RC_SERVICE")")" +thisdir=/home/dakkar/src/color export HOME="$thisdir" description="syntax highlighter service" -: ${pidfile:=/run/color.pid} +: ${pidfile:=$thisdir/color.pid} : ${instances:=2} -: ${logbase:=/var/log/color} +: ${logbase:=$thisdir/color} + +: ${path_to_node:=/home/dakkar/.nvm/versions/node/v20.15.0/bin} + +full_path="${path_to_node}:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin" depend() { use net @@ -15,11 +19,11 @@ depend() { my_args=( --instances "$instances" --output "${logbase}.out" --error "${logbase}.err" - --pid "$pidfile" --silent ) + --pid "$pidfile" ) start() { ebegin "Starting color" - "${thisdir}/node_modules/.bin/pm2" \ + sudo -u dakkar HOME=$HOME PATH="$full_path" "${thisdir}/node_modules/.bin/pm2" \ "${my_args[@]}" \ --name color \ start "${thisdir}/index.js" @@ -28,7 +32,7 @@ start() { stop() { ebegin "Stopping color" - "${thisdir}/node_modules/.bin/pm2" \ + sudo -u dakkar HOME=$HOME PATH="$full_path" "${thisdir}/node_modules/.bin/pm2" \ "${my_args[@]}" \ kill eend $? diff --git a/package.json b/package.json index 6847340..e231bae 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "author": "", "license": "AGPL-3.0", "dependencies": { + "first-mate-select-grammar": "^1.0.3", "highlights": "^3.1.6", "language-emacs-lisp": "github:Alhadis/language-emacs-lisp", "language-openscad": "github:rubyist/language-openscad", @@ -18,5 +19,6 @@ "language-restructuredtext": "github:Lukasa/language-restructuredtext", "less": "^3.13.1", "pm2": "^5.3.0" - } + }, + "packageManager": "pnpm@8.7.4+sha512.fdb4396d7a7c97b92b866d905d0546b8f8f3342fd9fe9d1f2b8930f1a22ba86d18b614d2f5a9112861e25b26875fadb7967b42ae21c16593ea85b5dccea48d56" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0cf9572..6fbd3ff 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,6 +5,9 @@ settings: excludeLinksFromLockfile: false dependencies: + first-mate-select-grammar: + specifier: ^1.0.3 + version: 1.0.3 highlights: specifier: ^3.1.6 version: 3.1.6 @@ -16,7 +19,7 @@ dependencies: version: github.com/rubyist/language-openscad/e8873181b4f1e84af65193680b98dd87a42d04a6 language-perl6: specifier: github:Raku/atom-language-perl6 - version: git@github.com+Raku/atom-language-perl6/8c196e381edb0e5575db611bad4ca7de8b437d66 + version: git@github.com+Raku/atom-language-perl6/bd341e83c14a69b68cb304fb6931abed8473b05a language-restructuredtext: specifier: github:Lukasa/language-restructuredtext version: github.com/Lukasa/language-restructuredtext/c97b54febdd44c7600a944e49fc188e5e024a7cb @@ -1620,8 +1623,8 @@ packages: y18n: 3.2.2 dev: false - git@github.com+Raku/atom-language-perl6/8c196e381edb0e5575db611bad4ca7de8b437d66: - resolution: {commit: 8c196e381edb0e5575db611bad4ca7de8b437d66, repo: git@github.com:Raku/atom-language-perl6.git, type: git} + git@github.com+Raku/atom-language-perl6/bd341e83c14a69b68cb304fb6931abed8473b05a: + resolution: {commit: bd341e83c14a69b68cb304fb6931abed8473b05a, repo: git@github.com:Raku/atom-language-perl6.git, type: git} name: language-perl6 version: 1.17.1 dev: false |