View Single Post
Posts: 196 | Thanked: 54 times | Joined on Jan 2010 @ UK
#192
two files in debian control

postinst & postrm
Code:
#!/bin/sh

#update sudoers

update-sudoers
create the following file

etc/sudoers.d/healthcheck.sudoers
Code:
user ALL = NOPASSWD: /<path>/command
put all the commands you need to run as root.

this will allow commands to be run as root when your package is installed, and stopped when package is removed.
 

The Following 2 Users Say Thank You to fred123 For This Useful Post: