Comments (7)
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.
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.
Word. I'll see if I can reproduce it on a VM and see if that change fixes it.
from node-deb.
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.
@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.
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.
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)
- No more node_modules/.bin directory in the debian package HOT 7
- Migrate from Bash to JavaScript
- Error parsing file HOT 6
- Using dh-sysuser when available HOT 1
- Unable to run app HOT 9
- node-deb not ignoring own temp directory... HOT 1
- Does node_deb.entrypoints.cli support more than 1 file? HOT 1
- Deprecated dependencies HOT 1
- Use node-deb in bitbucket pipelines HOT 1
- dpkg-deb: error: unable to create 'real-app_0.1.0_all.deb': Success
- Add option to specify conflicts
- Add Conflicts in debian control template
- add option to not create system users or groups HOT 3
- Typo prevents removing links from .bin HOT 1
- add tests for Bionic Beaver when it's released
- npm install in postinst fails when having native library dependency HOT 3
- Question: usage of pm2
- bash: node-deb: command not found HOT 5
- unescaped newline inside substitute pattern HOT 1
- postinst prevent user creation HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-deb.