Giter Site home page Giter Site logo

pure systemd systems about node-deb HOT 7 CLOSED

heartsucker avatar heartsucker commented on August 24, 2024
pure systemd systems

from node-deb.

Comments (7)

heartsucker avatar heartsucker commented on August 24, 2024

From the systemctl manpages:

preset NAME...

    Reset one or more unit files, as specified on the command line, to the defaults configured in the preset policy files. This has the same effect as disable or enable, depending how the unit is listed in the preset files.

    Use --preset-mode= to control whether units shall be enabled and disabled, or only enabled, or only disabled.

    For more information on the preset policy format, see systemd.preset(5). For more information on the concept of presets, please consult the Preset document.

So to me this looks like systemctl enable $service should cover it. We don't use any systemd based OS's at work, and I built support for this as a convenience for everyone else, so I don't have complete knowledge of how it works.

If you can find a link explaining why the preset command should be added, I'll look into it further.

from node-deb.

empierre avatar empierre commented on August 24, 2024

Hello,

I understand and appreciate your work here.

I've bumped in that issue on installing on a ubuntu 15.10(which are the latest), all was fine except it wasn't activated... so service was not started on reboot.

from node-deb.

heartsucker avatar heartsucker commented on August 24, 2024

Word. I'll see if I can reproduce it on a VM and see if that change fixes it.

from node-deb.

empierre avatar empierre commented on August 24, 2024

also had issues of npm unpak issues, had to add this to correct the issue (clean cache and install as an unprivillegied user:

preinst:
npm cache clean

postint:
chown 'www-data:www-data' '/var/www/'
chown -R 'www-data:www-data' '/usr/share/mydomoathome'

npm_install() {
cd "/usr/share/$1/app"
if [ -e 'node_modules' ]; then
rm -rf 'node_modules'
fi
sudo -u www-data npm install --production
}

from node-deb.

heartsucker avatar heartsucker commented on August 24, 2024

@empierre I tested this on an Ubuntu 15.x VM and a Debian 8 VM, and the services appears to survive the restart with just systemctl enable and systemctl start in the postinst script. I'm marking this as "won't fix." I'm opening a second ticket about the ownership problems on the files.

from node-deb.

empierre avatar empierre commented on August 24, 2024

Looking to literature as other user reports issue on others init system I found this:

if hash service 2> /dev/null; then
if [[ "$init_type" == 'auto' || "$init_type" == 'upstart' ]]; then
service "$service_name" start || echo "${service_name} could not be registered or started"
service enable "$service_name"
fi

enable is required to start automatically on next reboot, equivalent here for upstart:

elif hash start 2> /dev/null; then
if [[ "$init_type" == 'auto' || "$init_type" == 'upstart' ]]; then
start "$service_name" || echo "${service_name} could not be registered or started"
echo ENABLED=1 > "/etc/default/$service_name"
echo start > "/etc/init/$service_name.override"
fi

from node-deb.

empierre avatar empierre commented on August 24, 2024

some user reported this too on PI (don't know if this is PI 1 or 2

pi@domoticzpi ~ $ sudo service mydomoathome status
● mydomoathome.service - MDAH ISS Rest interface for Domoticz to Imperihome
Loaded: loaded (/etc/systemd/system/mydomoathome.service; disabled)
Active: inactive (dead)
pi@domoticzpi ~ $ sudo service mydomoathome start

from node-deb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.