Try with lil-pids
This commit is contained in:
parent
e103ca5333
commit
a928d89c3e
|
@ -211,7 +211,6 @@ function remove_datserver {
|
|||
remove_app datserver
|
||||
remove_completion_param install_datserver
|
||||
sed -i '/datserver/d' "$COMPLETION_FILE"
|
||||
rm /usr/bin/run_datserver
|
||||
}
|
||||
|
||||
function install_datserver {
|
||||
|
@ -230,12 +229,13 @@ function install_datserver {
|
|||
exit 4635439
|
||||
fi
|
||||
|
||||
{ echo '#!/bin/bash';
|
||||
echo 'cd /etc/datserver';
|
||||
echo './node_modules/.bin/hypercored'; } > /usr/bin/run_datserver
|
||||
chmod +x /usr/bin/run_datserver
|
||||
if ! npm install lil-pids; then
|
||||
echo $'lil-pids was not installed'
|
||||
exit 36483463
|
||||
fi
|
||||
|
||||
echo "$DATSERVER_DIRECTORY/node_modules/.bin/hypercored --cwd $DATSERVER_DIRECTORY" > $DATSERVER_DIRECTORY/services
|
||||
|
||||
set_completion_param "datserver version" "$DATSERVER_DAT_VERSION"
|
||||
set_completion_param "datserver hypercored version" "$DATSERVER_HYPERCORED_VERSION"
|
||||
|
||||
adduser --system --home="$DATSERVER_DIRECTORY" --group datserver
|
||||
|
@ -252,7 +252,7 @@ function install_datserver {
|
|||
echo '[Service]';
|
||||
echo 'User=datserver';
|
||||
echo 'Group=datserver';
|
||||
echo "ExecStart=/usr/bin/run_datserver";
|
||||
echo "ExecStart=$DATSERVER_DIRECTORY/node_modules/.bin/lil-pids $DATSERVER_DIRECTORY/services $DATSERVER_DIRECTORY/pids";
|
||||
echo 'Restart=always';
|
||||
echo "WorkingDirectory=$DATSERVER_DIRECTORY";
|
||||
echo 'StandardError=syslog';
|
||||
|
|
Loading…
Reference in New Issue