smeserver-transmission/createlinks

32 lines
1.3 KiB
Plaintext
Raw Permalink Normal View History

#!/usr/bin/perl -w
use esmith::Build::CreateLinks qw(:all);
####################
# links to add
# templates to expand
templates2events( "/var/lib/transmission/settings.json" , qw( transmission-update conf-transmission post-upgrade));
templates2events( "/etc/samba/smb.conf" , qw( transmission-update conf-transmission ));
templates2events("/etc/httpd/conf/httpd.conf", qw( transmission-update conf-transmission ));
# services to launch on event
foreach my $event (qw(conf-transmission transmission-update))
{
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/transmission-daemon");
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/smb");
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/iptables");
# actions to perform
safe_symlink("../actions/transmission", "root/etc/e-smith/events/$event/20transmission");
}
safe_symlink("../actions/transmission", "root/etc/e-smith/events/bootstrap-console-save/20transmission");
# links for rc.d from init.d
service_link_enhanced("transmission-daemon", "S85", "7");
service_link_enhanced("transmission-daemon", "K45", "6");
service_link_enhanced("transmission-daemon", "K45", "0");
service_link_enhanced("transmission-daemon", "K45", "1");