Changes
Jump to navigation
Jump to search
← Older edit
KnownProblems
(view source)
Revision as of 20:34, 4 July 2022
665 bytes added
,
20:34, 4 July 2022
→only run script in a daemontool runit /service/servicename folder
Line 219:
Line 219:
mkdir -p /etc/lib/systemd/system/'''servicename'''.service.d/
mkdir -p /etc/lib/systemd/system/'''servicename'''.service.d/
printf "[Install]\nWantedBy=sme-server.target\n" > /etc/lib/systemd/system/'''servicename'''.service.d/50koozali.conf
printf "[Install]\nWantedBy=sme-server.target\n" > /etc/lib/systemd/system/'''servicename'''.service.d/50koozali.conf
+
systemctl daemon-reload
/etc/e-smith/events/actions/systemd-default
/etc/e-smith/events/actions/systemd-default
Line 239:
Line 240:
cd /etc/rc.d/rc7.d
cd /etc/rc.d/rc7.d
ln -s ../init.d/'''e-smith-service''' S85'''servicename'''
ln -s ../init.d/'''e-smith-service''' S85'''servicename'''
+
+
====only run script in a daemontool runit /service/'''servicename''' folder====
+
as previously replace servicename to the actual service name
+
+
<syntaxhighlight lang="bash" >printf "[Unit]
+
Description=servicename
+
Requires=runit.service
+
+
[Service]
+
Type=oneshot
+
ExecStartPre=/sbin/e-smith/service-status servicename
+
ExecStart=/usr/bin/sv u /service/servicename
+
ExecStop=/usr/bin/sv stop /service/servicename
+
ExecReload=/usr/bin/sv t /service/servicename
+
RemainAfterExit=yes
+
+
[Install]
+
WantedBy=sme-server.target" > /etc/systemd/system/servicename.service
+
systemctl daemon-reload
+
/etc/e-smith//events/actions/systemd-default
+
</syntaxhighlight>
==Packages==
==Packages==
Unnilennium
Super Admin, Wiki & Docs Team,
Bureaucrats
,
Interface administrators
,
Administrators
3,250
edits
Navigation menu
Personal tools
Log in
Namespaces
Page
Discussion
Variants
Views
Read
View source
View history
More
Search
Koozali SME Server
Main Page
Welcome
Releases
Testimonials
Documentation
SME Server FAQ
Volunteering
Commercial Support
Recent activities
Dashboard
Recent wiki changes
Recent bug changes
Unread Forum posts
Koozali resources
Contribs
How-To's
Forums
Bugzilla
Mailing Lists
Translations
Download
Koozali SME Server wiki
Wiki statistics
Wiki categories
Wiki Help
Koozali Wiki Help
Tools
Special pages
Printable version