labriqueinternet / DEPRECATED-build.labriqueinter.net

Debian image with YunoHost for olinuxino boards (scripts)
20 stars 10 forks source link

[WIP] fix #56 #57

Closed keomabrun closed 5 years ago

keomabrun commented 5 years ago

Currently we create files in /etc/systemd/system/multi-user.target.wants/ and create links in /etc/systemd/system/. We should do the contrary. Not sure this is why the hypercube service is not fully removed after the internetcube install but that's apparently the right way of managing services.

Cf your own services: ls -l /etc/systemd/system/multi-user.target.wants/ --color

keomabrun commented 5 years ago

before

root@francitest:~# systemctl status hypercube.service 
● hypercube.service - Hypercube
   Loaded: loaded (/etc/systemd/system/multi-user.target.wants/hypercube.service; bad; vendor preset: enabled)
   Active: activating (start) since Sat 2019-02-23 12:17:24 UTC; 44min ago
 Main PID: 1681 (hypercube.sh)
    Tasks: 13 (limit: 4915)
   CGroup: /system.slice/hypercube.service
           ├─1681 /bin/bash /usr/local/bin/hypercube.sh
           ├─1719 python -m SimpleHTTPServer 2468
           ├─1724 /bin/bash /usr/local/bin/hypercube.sh
           ├─2835 /bin/bash /usr/local/bin/hypercube.sh
           ├─2838 /bin/bash /usr/local/bin/hypercube.sh
           ├─2842 /bin/bash /usr/local/bin/hypercube.sh
           ├─2847 /bin/bash /usr/local/bin/hypercube.sh
           ├─2912 sleep 4h
           ├─2913 sleep 300
           ├─3030 sleep 300
           ├─3072 sleep 300
           ├─3336 sleep 300
           └─4085 sleep 1

After

root@francitest:~# systemctl status hypercube.service 
● hypercube.service - Hypercube
   Loaded: loaded (/etc/systemd/system/hypercube.service; disabled; vendor preset: enabled)
   Active: inactive (dead)