Changes

From SME Server
Jump to navigationJump to search
614 bytes added ,  19:20, 4 July 2022
Line 239: Line 239:  
  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====
 +
<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==
Super Admin, Wiki & Docs Team, Bureaucrats, Interface administrators, Administrators
3,254

edits

Navigation menu