Changes

From SME Server
Jump to navigationJump to search
36 bytes removed ,  19:33, 4 July 2022
Line 243: Line 243:  
====only run script in a daemontool runit /service/'''servicename''' folder====
 
====only run script in a daemontool runit /service/'''servicename''' folder====
 
<syntaxhighlight lang="bash" >printf "[Unit]
 
<syntaxhighlight lang="bash" >printf "[Unit]
Description='''servicename'''
+
Description=servicename
 
Requires=runit.service
 
Requires=runit.service
    
[Service]
 
[Service]
 
Type=oneshot
 
Type=oneshot
ExecStartPre=/sbin/e-smith/service-status '''servicename'''
+
ExecStartPre=/sbin/e-smith/service-status servicename
ExecStart=/usr/bin/sv u /service/'''servicename'''
+
ExecStart=/usr/bin/sv u /service/servicename
ExecStop=/usr/bin/sv stop /service/'''servicename'''
+
ExecStop=/usr/bin/sv stop /service/servicename
ExecReload=/usr/bin/sv t /service/'''servicename'''
+
ExecReload=/usr/bin/sv t /service/servicename
 
RemainAfterExit=yes
 
RemainAfterExit=yes
    
[Install]
 
[Install]
WantedBy=sme-server.target" > /etc/systemd/system/'''servicename'''.service
+
WantedBy=sme-server.target" > /etc/systemd/system/servicename.service
 
systemctl daemon-reload
 
systemctl daemon-reload
 
/etc/e-smith//events/actions/systemd-default
 
/etc/e-smith//events/actions/systemd-default
Super Admin, Wiki & Docs Team, Bureaucrats, Interface administrators, Administrators
3,254

edits

Navigation menu