This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LdapSource.find_each do |source| | |
ldap_config = source.preferences | |
ldap_connection = ::Ldap.new(ldap_config) | |
group_config = { | |
filter: ldap_config[:group_filter] | |
} | |
ldap_group = ::Ldap::Group.new(group_config, ldap: ldap_connection) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prod_mode = false | |
if ARGV[0].present? | |
prod_mode = true | |
puts "PROD MODE ON!!!!" | |
sleep 3 | |
end | |
User.find_each do |user| | |
begin | |
valid = Mail::Address.new(user.email) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prod_mode = false | |
if ARGV[0].present? | |
prod_mode = true | |
puts "PROD MODE ON!!!" | |
sleep 2 | |
end | |
Store.where("o_id LIKE '%.0'").find_each do |st| | |
nv = st.o_id.sub(/\.0$/, '') | |
puts "Change store object #{st.id} (#{st.store_object.name}) o_id from #{st.o_id} to #{nv}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PATH=/opt/zammad/bin:/opt/zammad/vendor/bundle/bin:/sbin:/bin:/usr/sbin:/usr/bin: | |
. /opt/zammad/contrib/packager.io/config | |
. /opt/zammad/contrib/packager.io/functions | |
function update_zammad_system () { | |
if [ "${OS}" == "DEBIAN" ]; then | |
apt update | |
apt install -y zammad |