HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

[hylafax-users] Removing deleted users from HylaFAX control files



Hopefully this is an easy Q.

When we delete a Unix user, I'd like to also automatically delete their line
in the HylaFAX 'hosts' file.
I can do this either with 'grep' or 'sed' but since both of these commands
would need to use a temporary file, would there be a problem with HylaFAX
with due to the INODE change if I *mv'd* the temporary file back to the
original file (and avoid needing to remove the 'tmp' file too)??? I could
merely copy the 'tmp' file back over the original file so the INODE did not
change but actually wondered about any INODE change (in general) with
HylaFAX files.

Something like:
# Remove HylaFAX hosts file entry
sed '/^$userid:/d' "$faxfilespath/hosts" > "$faxfilespath/hosts.tmp"

mv -f "$faxfilespath/hosts.tmp" "$faxfilespath/hosts"
OR
cp -fp  "$faxfilespath/hosts.tmp" "$faxfilespath/hosts" 
rm -f "$faxfilespath/hosts.tmp"

Thanks!
ken

Kenneth Abrahamsen
425-806-3369 - Voice
425-486-7868 - FAX
kabrahamsen@wrightgroup.com



____________________ HylaFAX(tm) Users Mailing List _______________________
 To unsub: mail -s unsubscribe hylafax-users-request@hylafax.org < /dev/null




Project hosted by iFAX Solutions