????JFIF??x?x????'
| Server IP : 79.136.114.73 / Your IP : 216.73.216.61 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/lib/dpkg/info/ |
Upload File : |
#!/bin/sh
# postinst script for hddtemp
set -e
conffile="/etc/default/hddtemp"
update_config_file()
{
db_field=$1
config_field=$2
RET=false
db_get $db_field
if [ -n "$RET" ] ; then
if grep -q "^$config_field" $conffile ; then
# keep any admin changes, while replacing the variable content
sed "s/^[ ]*$config_field=\".*\"/$config_field=\"$RET\"/" < $conffile > $conffile.new &&
mv $conffile.new $conffile
else
echo "$config_field=\"$RET\"" >> $conffile
fi
fi
}
# Source debconf library -- we have a Depends line
# to make sure it is there...
. /usr/share/debconf/confmodule
db_version 2.0
case "$1" in
configure)
if [ -f $conffile ] ; then
sed -i -e 's/^[ ]*DAEMON/RUN_DAEMON/g' \
-e 's/^[ ]*SYSLOG/RUN_SYSLOG/g' \
-e 's/^# Master system-wide hddtemp switch.*/# hddtemp network daemon switch. If set to true, hddtemp will listen/' \
-e 's/^# set to true. STOP THE SERVICE.*/# for incoming connections./' \
-e 's/^# Logging period.*temperatures.$/# Logging period (in seconds) for the temperatures. If set to a value\n# different than 0, hddtemp will run as a daemon periodically logging\n# the temperatures through syslog/' \
$conffile
if ! grep -q RUN_SYSLOG $conffile ; then
cat << EOF >> $conffile
# Logging period (in seconds) for the temperatures. If set to a value
# different than 0, hddtemp will run as a daemon periodically logging
# the temperatures through syslog
RUN_SYSLOG="0"
EOF
fi
if ! grep -q OPTIONS $conffile ; then
cat << EOF >> $conffile
# Other options to pass to hddtemp
OPTIONS=""
EOF
fi
if ! grep -q DISKS_NOPROBE $conffile ; then
cat << EOF >> $conffile
# List of devices you want to use with hddtemp, but that would not be
# probed for a working sensor.
DISKS_NOPROBE=""
EOF
fi
else
cat << EOF > $conffile
# Defaults for hddtemp initscript (/etc/init.d/hddtemp)
# This is a POSIX shell fragment
# [automatically edited by postinst, do not change line format ]
# hddtemp network daemon switch. If set to true, hddtemp will listen
# for incoming connections.
RUN_DAEMON="true"
# List of devices you want to use with hddtemp. If none specified,
# hddtemp will probe standard devices.
#DISKS="/dev/hda"
# List of devices you want to use with hddtemp, but that would not be
# probed for a working sensor.
DISKS_NOPROBE=""
# IP address of the interface on which you want hddtemp to be bound
# on. If none specified, goes to 127.0.0.1. Use 0.0.0.0 to bind hddtemp
# on all interfaces.
INTERFACE="127.0.0.1"
# Port number on which you want hddtemp to listen on. If none specified,
# the port 7634 is used.
PORT="7634"
# Database file to use. If none specified, /etc/hddtemp.db is used.
#DATABASE="/etc/hddtemp.db"
# Separator to use between fields. The default separator is '|'.
#SEPARATOR="|"
# Logging period (in seconds) for the temperatures. If set to a value
# different than 0, hddtemp will run as a daemon periodically logging
# the temperatures through syslog
RUN_SYSLOG="0"
# Other options to pass to hddtemp
OPTIONS=""
EOF
fi
update_config_file hddtemp/daemon RUN_DAEMON
update_config_file hddtemp/syslog RUN_SYSLOG
update_config_file hddtemp/interface INTERFACE
update_config_file hddtemp/port PORT
if ! dpkg-statoverride --list /usr/sbin/hddtemp 1>/dev/null 2>&1; then
# check if we are installing suid or not
RET=false
db_get hddtemp/SUID_bit
if [ "$RET" = "true" ]; then
chmod 4755 /usr/sbin/hddtemp
ln -sf /usr/sbin/hddtemp /usr/bin/hddtemp
ln -sf ../man8/hddtemp.8.gz /usr/share/man/man1/hddtemp.1.gz
else
chmod 0755 /usr/sbin/hddtemp
rm -f /usr/bin/hddtemp
rm -f /usr/share/man/man8/hddtemp.1.gz
fi
fi
db_stop
rm -f /etc/logcheck/ignore.d.workstation/hddtemp
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
# Automatically added by dh_installinit
if [ -x "/etc/init.d/hddtemp" ]; then
if [ ! -e "/etc/init/hddtemp.conf" ]; then
update-rc.d hddtemp defaults >/dev/null
fi
invoke-rc.d hddtemp start || exit $?
fi
# End automatically added section
exit 0