Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
1f78e5fa1c | |||
e5e819e337 |
11
dinit/hooks/dinit-user-spawn-install.hook
Normal file
11
dinit/hooks/dinit-user-spawn-install.hook
Normal file
@@ -0,0 +1,11 @@
|
||||
[Trigger]
|
||||
Type = Path
|
||||
Operation = Install
|
||||
# Operation = Upgrade
|
||||
Target = usr/lib/dinit.d/dinit-user-spawn
|
||||
|
||||
[Action]
|
||||
Description = Enabling dinit user spawn ...
|
||||
When = PostTransaction
|
||||
Exec = /usr/share/libalpm/scripts/dinit-hook userspawnE
|
||||
NeedsTargets
|
10
dinit/hooks/dinit-user-spawn-remove.hook
Normal file
10
dinit/hooks/dinit-user-spawn-remove.hook
Normal file
@@ -0,0 +1,10 @@
|
||||
[Trigger]
|
||||
Type = Path
|
||||
Operation = Remove
|
||||
Target = usr/lib/dinit.d/dinit-user-spawn
|
||||
|
||||
[Action]
|
||||
Description = Disabling dinit user service help ...
|
||||
When = PostTransaction
|
||||
Exec = /usr/share/libalpm/scripts/dinit-hook userspawnD
|
||||
NeedsTargets
|
@@ -66,6 +66,20 @@ case $op in
|
||||
del) svc_del_help ;;
|
||||
addU) svc_user_add_help ;;
|
||||
delU) svc_user_del_help ;;
|
||||
userspawnE)
|
||||
if dinit_live; then
|
||||
/usr/bin/dinitctl enable dinit-user-spawn
|
||||
else
|
||||
/usr/bin/dinitctl enable -o dinit-user-spawn
|
||||
fi
|
||||
;;
|
||||
userspawnD)
|
||||
if dinit_live; then
|
||||
/usr/bin/dinitctl disable dinit-user-spawn
|
||||
else
|
||||
/usr/bin/dinitctl disable -o dinit-user-spawn
|
||||
fi
|
||||
;;
|
||||
*) echo >&2 " Invalid operation '$op'"; exit 1 ;;
|
||||
esac
|
||||
|
||||
|
Reference in New Issue
Block a user