DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
PROG = frr
-PAK_VER = 10
+PAK_VER = 11
DEPS =
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
PROG = zabbix_agentd
-PAK_VER = 14
+PAK_VER = 15
DEPS = fping
if [ -n "${key}" ] && ! grep -q "^${key}$" "/home/setup/.ssh/authorized_keys" 2>/dev/null; then
mkdir -p "/home/setup/.ssh"
chmod 700 "/home/setup/.ssh"
- chown setup.nobody "/home/setup/.ssh"
+ chown setup:nobody "/home/setup/.ssh"
echo "${key}" >> "/home/setup/.ssh/authorized_keys"
chmod 600 "/home/setup/.ssh/authorized_keys"
- chown setup.nobody "/home/setup/.ssh/authorized_keys"
+ chown setup:nobody "/home/setup/.ssh/authorized_keys"
fi
done
# Install directory
mkdir -p "${dir}"
chmod 700 "${dir}"
- chown "${user}.nobody" "${dir}"
+ chown "${user}:nobody" "${dir}"
# Install the key
echo "${key}" >> "${path}"
chmod 600 "${path}"
- chown "${user}.nobody" "${path}"
+ chown "${user}:nobody" "${path}"
fi
done
if [ -n "${key}" ] && ! grep -q "^${key}$" "/home/setup/.ssh/authorized_keys" 2>/dev/null; then
mkdir -p "/home/setup/.ssh"
chmod 700 "/home/setup/.ssh"
- chown setup.nobody "/home/setup/.ssh"
+ chown setup:nobody "/home/setup/.ssh"
echo "${key}" >> "/home/setup/.ssh/authorized_keys"
chmod 600 "/home/setup/.ssh/authorized_keys"
- chown setup.nobody "/home/setup/.ssh/authorized_keys"
+ chown setup:nobody "/home/setup/.ssh/authorized_keys"
fi
# Import any previous settings for the local interfaces
if [ -n "${key}" ] && ! grep -q "^${key}$" "/home/setup/.ssh/authorized_keys" 2>/dev/null; then
mkdir -p "/home/setup/.ssh"
chmod 700 "/home/setup/.ssh"
- chown setup.nobody "/home/setup/.ssh"
+ chown setup:nobody "/home/setup/.ssh"
echo "${key}" >> "/home/setup/.ssh/authorized_keys"
chmod 600 "/home/setup/.ssh/authorized_keys"
- chown setup.nobody "/home/setup/.ssh/authorized_keys"
+ chown setup:nobody "/home/setup/.ssh/authorized_keys"
fi
done <<<"$(get instance/attributes/ssh-keys)"
if [ -n "${key}" ] && ! grep -q "^${key}$" "/home/setup/.ssh/authorized_keys" 2>/dev/null; then
mkdir -p "/home/setup/.ssh"
chmod 700 "/home/setup/.ssh"
- chown setup.nobody "/home/setup/.ssh"
+ chown setup:nobody "/home/setup/.ssh"
echo "${key}" >> "/home/setup/.ssh/authorized_keys"
chmod 600 "/home/setup/.ssh/authorized_keys"
- chown setup.nobody "/home/setup/.ssh/authorized_keys"
+ chown setup:nobody "/home/setup/.ssh/authorized_keys"
fi
done <<<"$(get instance/metadata/ssh_authorized_keys)"
start)
# Fix permissions of configuration directory
if [ -d "/etc/frr" ]; then
- chown root.frr /etc/frr
+ chown root:frr /etc/frr
chmod 775 /etc/frr
fi
for daemon in ${DAEMONS}; do
if [ -f "/etc/frr/${daemon}.conf" ]; then
# Set permissions
- chown frr.frr "/etc/frr/${daemon}.conf"
+ chown frr:frr "/etc/frr/${daemon}.conf"
boot_mesg "Starting FRRouting ${daemon}..."
loadproc "/usr/sbin/${daemon}" --daemon
start)
if [ ! -d "/var/run/zabbix" ]; then
mkdir -p /var/run/zabbix
- chown zabbix.zabbix /var/run/zabbix
+ chown zabbix:zabbix /var/run/zabbix
fi
boot_mesg "Starting Zabbix Agent..."
fi
if [ ! -e /var/lock/time ]; then
mkdir -p /var/lock/time
- chown nobody.root /var/lock/time
+ chown nobody:root /var/lock/time
fi
if [ ! -e /var/run/clamav ]; then
mkdir -p /var/run/clamav
;;
setperms)
- chown -R nobody.squid /var/updatecache/
+ chown -R nobody:squid /var/updatecache/
;;
*)
executeCommand(command);
snprintf(command, STRING_SIZE-1, "/usr/sbin/openvpn --config /var/ipfire/ovpn/server.conf");
executeCommand(command);
- snprintf(command, STRING_SIZE-1, "/bin/chown root.nobody /var/run/ovpnserver.log");
+ snprintf(command, STRING_SIZE-1, "/bin/chown root:nobody /var/run/ovpnserver.log");
executeCommand(command);
snprintf(command, STRING_SIZE-1, "/bin/chmod 644 /var/run/ovpnserver.log");
executeCommand(command);
sleep(5);
unlink("/var/ipfire/remote/enablessh");
safe_system("cat /var/ipfire/remote/settings | sed 's/ENABLE_SSH=on/ENABLE_SSH=off/' > /var/ipfire/remote/settings2 && mv /var/ipfire/remote/settings2 /var/ipfire/remote/settings");
- safe_system("chown nobody.nobody /var/ipfire/remote/settings");
+ safe_system("chown nobody:nobody /var/ipfire/remote/settings");
snprintf(command, BUFFER_SIZE-1, "sleep %s && /usr/local/bin/sshctrl &", argv[2]);
safe_system(command);
}