发现一个用python写的systemctl程序项目,可以在不支持systemctl的系统上使用,不过前提是要安装pyhton
大部分shell脚本用的都是systemctl,所以很多脚本Alpine小鸡用不了,有这个就可以了

项目链接https://github.com/gdraheim/docker-systemctl-replacement

直接下载到bin就可以用了,和原版的systemctl使用一样

Alpine使用

apk updateapk add python3wget https://raw.githubusercontent.com/gdraheim/docker-systemctl-replacement/refs/heads/master/files/docker/systemctl3.py -O /bin/systemctlchmod +x /bin/systemctlmkdir mkdir -p /etc/systemd/system/