<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Hamletmun</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Hamletmun"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Hamletmun"/>
	<updated>2026-05-06T18:52:28Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Git&amp;diff=9991</id>
		<title>Git</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Git&amp;diff=9991"/>
		<updated>2014-05-29T12:13:15Z</updated>

		<summary type="html">&lt;p&gt;Hamletmun: /* Basic Git usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document describes how to use [http://git-scm.com git] for Alpine Linux development and related projects. If you just want to browse the Alpine git repositories, please visit [http://git.alpinelinux.org/cgit/aports git.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
== Basic Git usage ==&lt;br /&gt;
&lt;br /&gt;
{{:Development_using_git:Configuration}}&lt;br /&gt;
&lt;br /&gt;
{{Tip| If you want to use git with colored output use:&lt;br /&gt;
 {{Cmd|git config --global color.ui true&lt;br /&gt;
git config --global core.pager more}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Tip| If you want to use git with proxy server:&lt;br /&gt;
 {{Cmd|git config --global http.proxy http://proxy_ip:proxy_port}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{:Development_using_git:Email}}&lt;br /&gt;
&lt;br /&gt;
== Cloning a repository via Git ==&lt;br /&gt;
&lt;br /&gt;
There are two ways to work with the Alpine git repository...&lt;br /&gt;
&lt;br /&gt;
* ...without write access.&lt;br /&gt;
* ...with write access.&lt;br /&gt;
&lt;br /&gt;
[http://git.alpinelinux.org/cgit/aports git.alpinelinux.org] shows all available Alpine git repositories.&lt;br /&gt;
&lt;br /&gt;
=== Without write access ===&lt;br /&gt;
&lt;br /&gt;
If you want to clone the Alpine aports repository, switch to the directory you want to have the &#039;&#039;aports/&#039;&#039; directory in and launch git.&lt;br /&gt;
 &lt;br /&gt;
{{Cmd|git clone git://git.alpinelinux.org/aports.git}}&lt;br /&gt;
&lt;br /&gt;
{{Tip| If you are using proxy server:&lt;br /&gt;
 {{Cmd|git clone http://git.alpinelinux.org/cgit/aports}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If you want only the last 3 revisions:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|git clone git://git.alpinelinux.org/aports.git --depth 3}}&lt;br /&gt;
&lt;br /&gt;
Use the command below to see the full log of the trunk. &lt;br /&gt;
&lt;br /&gt;
{{Cmd|git log}}&lt;br /&gt;
&lt;br /&gt;
=== With write access ===&lt;br /&gt;
&lt;br /&gt;
If you have write access to the Alpine the URL needs to be adjusted for cloning a repository&lt;br /&gt;
&lt;br /&gt;
{{Cmd|git clone ssh://username@git.alpinelinux.org/aports.git}}&lt;br /&gt;
&lt;br /&gt;
== General GIT Workflow ==&lt;br /&gt;
# Make your file edits in your local checkout of the local copy of repository.&lt;br /&gt;
# Commit the changes in your local repository: {{Cmd|git commit}}&lt;br /&gt;
# Bring the rest of your local repository up to date: {{Cmd|git pull --rebase}}&lt;br /&gt;
# Check what you are going to commit: {{Cmd|git log origin..master}}&lt;br /&gt;
# Move your changes up to the master if you have write access {{Cmd|git push}} or [[Creating_patches|create a patch]] if not.&lt;br /&gt;
&lt;br /&gt;
== Other related articles ==&lt;br /&gt;
&lt;br /&gt;
* [[Development_using_git:Basic_usage| Basic usage]]&lt;br /&gt;
* [[Package Maintainers]]&lt;br /&gt;
* [[Creating patches]]&lt;br /&gt;
* [[Development_using_git:Developer_repositories|Developer repositories]]&lt;br /&gt;
* [[Development_using_git:Cgit| Using Cgit]]&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
{{:Development_using_git:Documentation}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Git]]&lt;/div&gt;</summary>
		<author><name>Hamletmun</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Git&amp;diff=9985</id>
		<title>Git</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Git&amp;diff=9985"/>
		<updated>2014-05-21T19:14:09Z</updated>

		<summary type="html">&lt;p&gt;Hamletmun: /* Cloning a repository via Git */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document describes how to use [http://git-scm.com git] for Alpine Linux development and related projects. If you just want to browse the Alpine git repositories, please visit [http://git.alpinelinux.org/cgit/aports git.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
== Basic Git usage ==&lt;br /&gt;
&lt;br /&gt;
{{:Development_using_git:Configuration}}&lt;br /&gt;
&lt;br /&gt;
{{Tip| If you want to use git with colored output use:&lt;br /&gt;
 {{Cmd|git config --global color.ui true}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Tip| If you want to use git with proxy server:&lt;br /&gt;
 {{Cmd|git config --global http.proxy http://proxy_ip:proxy_port}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{:Development_using_git:Email}}&lt;br /&gt;
&lt;br /&gt;
== Cloning a repository via Git ==&lt;br /&gt;
&lt;br /&gt;
There are two ways to work with the Alpine git repository...&lt;br /&gt;
&lt;br /&gt;
* ...without write access.&lt;br /&gt;
* ...with write access.&lt;br /&gt;
&lt;br /&gt;
[http://git.alpinelinux.org/cgit/aports git.alpinelinux.org] shows all available Alpine git repositories.&lt;br /&gt;
&lt;br /&gt;
=== Without write access ===&lt;br /&gt;
&lt;br /&gt;
If you want to clone the Alpine aports repository, switch to the directory you want to have the &#039;&#039;aports/&#039;&#039; directory in and launch git.&lt;br /&gt;
 &lt;br /&gt;
{{Cmd|git clone git://git.alpinelinux.org/aports.git}}&lt;br /&gt;
&lt;br /&gt;
{{Tip| If you are using proxy server:&lt;br /&gt;
 {{Cmd|git clone http://git.alpinelinux.org/cgit/aports}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If you want only the last 3 revisions:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|git clone git://git.alpinelinux.org/aports.git --depth 3}}&lt;br /&gt;
&lt;br /&gt;
Use the command below to see the full log of the trunk. &lt;br /&gt;
&lt;br /&gt;
{{Cmd|git log}}&lt;br /&gt;
&lt;br /&gt;
=== With write access ===&lt;br /&gt;
&lt;br /&gt;
If you have write access to the Alpine the URL needs to be adjusted for cloning a repository&lt;br /&gt;
&lt;br /&gt;
{{Cmd|git clone ssh://username@git.alpinelinux.org/aports.git}}&lt;br /&gt;
&lt;br /&gt;
== General GIT Workflow ==&lt;br /&gt;
# Make your file edits in your local checkout of the local copy of repository.&lt;br /&gt;
# Commit the changes in your local repository: {{Cmd|git commit}}&lt;br /&gt;
# Bring the rest of your local repository up to date: {{Cmd|git pull --rebase}}&lt;br /&gt;
# Check what you are going to commit: {{Cmd|git log origin..master}}&lt;br /&gt;
# Move your changes up to the master if you have write access {{Cmd|git push}} or [[Creating_patches|create a patch]] if not.&lt;br /&gt;
&lt;br /&gt;
== Other related articles ==&lt;br /&gt;
&lt;br /&gt;
* [[Development_using_git:Basic_usage| Basic usage]]&lt;br /&gt;
* [[Package Maintainers]]&lt;br /&gt;
* [[Creating patches]]&lt;br /&gt;
* [[Development_using_git:Developer_repositories|Developer repositories]]&lt;br /&gt;
* [[Development_using_git:Cgit| Using Cgit]]&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
{{:Development_using_git:Documentation}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Git]]&lt;/div&gt;</summary>
		<author><name>Hamletmun</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Git&amp;diff=9984</id>
		<title>Git</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Git&amp;diff=9984"/>
		<updated>2014-05-21T19:10:16Z</updated>

		<summary type="html">&lt;p&gt;Hamletmun: /* Basic Git usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document describes how to use [http://git-scm.com git] for Alpine Linux development and related projects. If you just want to browse the Alpine git repositories, please visit [http://git.alpinelinux.org/cgit/aports git.alpinelinux.org].&lt;br /&gt;
&lt;br /&gt;
== Basic Git usage ==&lt;br /&gt;
&lt;br /&gt;
{{:Development_using_git:Configuration}}&lt;br /&gt;
&lt;br /&gt;
{{Tip| If you want to use git with colored output use:&lt;br /&gt;
 {{Cmd|git config --global color.ui true}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Tip| If you want to use git with proxy server:&lt;br /&gt;
 {{Cmd|git config --global http.proxy http://proxy_ip:proxy_port}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{:Development_using_git:Email}}&lt;br /&gt;
&lt;br /&gt;
== Cloning a repository via Git ==&lt;br /&gt;
&lt;br /&gt;
There are two ways to work with the Alpine git repository...&lt;br /&gt;
&lt;br /&gt;
* ...without write access.&lt;br /&gt;
* ...with write access.&lt;br /&gt;
&lt;br /&gt;
[http://git.alpinelinux.org/cgit/aports git.alpinelinux.org] shows all available Alpine git repositories.&lt;br /&gt;
&lt;br /&gt;
=== Without write access ===&lt;br /&gt;
&lt;br /&gt;
If you want to clone the Alpine aports repository, switch to the directory you want to have the &#039;&#039;aports/&#039;&#039; directory in and launch git.&lt;br /&gt;
 &lt;br /&gt;
{{Cmd|git clone git://git.alpinelinux.org/aports.git}}&lt;br /&gt;
&lt;br /&gt;
If you want only the last 3 revisions:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|git clone git://git.alpinelinux.org/aports.git --depth 3}}&lt;br /&gt;
&lt;br /&gt;
Use the command below to see the full log of the trunk. &lt;br /&gt;
&lt;br /&gt;
{{Cmd|git log}}&lt;br /&gt;
&lt;br /&gt;
=== With write access ===&lt;br /&gt;
&lt;br /&gt;
If you have write access to the Alpine the URL needs to be adjusted for cloning a repository&lt;br /&gt;
&lt;br /&gt;
{{Cmd|git clone ssh://username@git.alpinelinux.org/aports.git}}&lt;br /&gt;
&lt;br /&gt;
== General GIT Workflow ==&lt;br /&gt;
# Make your file edits in your local checkout of the local copy of repository.&lt;br /&gt;
# Commit the changes in your local repository: {{Cmd|git commit}}&lt;br /&gt;
# Bring the rest of your local repository up to date: {{Cmd|git pull --rebase}}&lt;br /&gt;
# Check what you are going to commit: {{Cmd|git log origin..master}}&lt;br /&gt;
# Move your changes up to the master if you have write access {{Cmd|git push}} or [[Creating_patches|create a patch]] if not.&lt;br /&gt;
&lt;br /&gt;
== Other related articles ==&lt;br /&gt;
&lt;br /&gt;
* [[Development_using_git:Basic_usage| Basic usage]]&lt;br /&gt;
* [[Package Maintainers]]&lt;br /&gt;
* [[Creating patches]]&lt;br /&gt;
* [[Development_using_git:Developer_repositories|Developer repositories]]&lt;br /&gt;
* [[Development_using_git:Cgit| Using Cgit]]&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
{{:Development_using_git:Documentation}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Git]]&lt;/div&gt;</summary>
		<author><name>Hamletmun</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Redmine&amp;diff=9870</id>
		<title>Redmine</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Redmine&amp;diff=9870"/>
		<updated>2014-02-25T14:58:57Z</updated>

		<summary type="html">&lt;p&gt;Hamletmun: /* Installing Redmine Since 2.1.2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Draft}}&lt;br /&gt;
&lt;br /&gt;
NOTE: Alpine 2.5+ installations need to follow installation instructions for version 2.1.2 at the bottom of this page.&lt;br /&gt;
&lt;br /&gt;
NOTE: This is a complete rewrite of our Redmine install how-to. Previously, Ruby packages needed by Redmine needed to be installed manually with rubygems. Now we have Ruby packages needed for Remine in our repository. As of writing, ruby packages are maintained in testing repository.&lt;br /&gt;
&lt;br /&gt;
=Some assumptions=&lt;br /&gt;
&lt;br /&gt;
* For this how-to we assume you are running an Hard-disk install of Alpine Linux. If you are running from RAM, please make sure you use LBU.&lt;br /&gt;
* Alpine Linux uses Lighttpd as default web-server. Redmine will be running with FastCGI inside Lighttpd. If you like to install Redmine with any other web-server, you will need to install it manually. Which are currently: ruby-rails ruby-fcgi ruby-rmagick ruby-i18n ruby-openid rubygems&lt;br /&gt;
* We are using MySQL as database for our Redmine install. Redmine is also able to run with PostgreSQL or SQLite.&lt;br /&gt;
* MySQL is running on a remote location. Please follow other tutorials on how to setup MySQL.  (need link).&lt;br /&gt;
* Detailed information regarding Redmine installation can be found: http://www.redmine.org/projects/redmine/wiki/RedmineInstall&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Installing Redmine=&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add redmine}}&lt;br /&gt;
&lt;br /&gt;
On a Alpine base install this should pull in approximately 50 packages including (almost) all Ruby dependencies and Lighttpd. If you like to run a different webserver, you will need to skip redmine package and install all deps manually with apk.&lt;br /&gt;
&lt;br /&gt;
=Database support=&lt;br /&gt;
Redmine supports various database backends. Here we will only cover MySQL and PostgreSQL.&lt;br /&gt;
&lt;br /&gt;
== Option 1 - MySQL ==&lt;br /&gt;
For Redmine to communicate with MySQL server we will need to have the mysql ruby package. (if you want to run another db, just install the appropriate db package).&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add ruby-mysql}}&lt;br /&gt;
&lt;br /&gt;
Now before we continue we need to prepare our database. According [http://www.redmine.org/projects/redmine/wiki/RedmineInstall Redmine website] you need to do the following:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|create database redmine character set utf8;&lt;br /&gt;
create user &#039;redmine&#039;@&#039;localhost&#039; identified by &#039;my_password&#039;;&lt;br /&gt;
grant all privileges on redmine.* to &#039;redmine&#039;@&#039;localhost&#039;;}}&lt;br /&gt;
&lt;br /&gt;
If you need mysql client, you can install it like this:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add mysql-client}}&lt;br /&gt;
&lt;br /&gt;
You can of course also use a tool like phpmyadmin to create the database and setup the user.&lt;br /&gt;
&lt;br /&gt;
== Option 2 - PostgreSQL ==&lt;br /&gt;
{{Cmd|apk add ruby-pg postgresql}}&lt;br /&gt;
&lt;br /&gt;
Initialize and start database engine:&lt;br /&gt;
{{Cmd|/etc/init.d/postgresql setup&lt;br /&gt;
/etc/init.d/postgresql start}}&lt;br /&gt;
&lt;br /&gt;
Create redmine db user, replacing &#039;redminepw&#039; with your own password:&lt;br /&gt;
{{Cmd|psql -U postgres -c &amp;quot;CREATE ROLE redmine LOGIN ENCRYPTED PASSWORD &#039;redminepw&#039; NOINHERIT VALID UNTIL &#039;infinity&#039;;&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
Create the redmine database (note that you need template0 for UTF8):&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;psql -U postgres -c &amp;quot;CREATE DATABASE redmine WITH ENCODING &#039;UTF8&#039; OWNER=redmine TEMPLATE = template0;&amp;quot;&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=Redmine config files=&lt;br /&gt;
&lt;br /&gt;
Redmine default config files are located inside /etc/redmine. For Redmine to find your database, please edit database.yml. We have removed all entries accept the default production one. For examples please check: /var/www/localhost/htdocs/redmine/config&lt;br /&gt;
If you need to edit additional configuration files, please move them to /etc/redmine and link them back to the original location. This way apk will use config protect and not overwrite your config files on update. Don&#039;t forget to edit the other files, like your SMTP configuration in configuration.yml.&lt;br /&gt;
&lt;br /&gt;
First we need to generate a session store secret:&lt;br /&gt;
&lt;br /&gt;
 su -pc &amp;quot;cd /var/www/localhost/htdocs/redmine; /usr/lib/ruby/gems/1.8/bin/rake generate_session_store&amp;quot; lighttpd&lt;br /&gt;
&lt;br /&gt;
Now we populate the database:&lt;br /&gt;
&lt;br /&gt;
 su -pc &amp;quot;cd /var/www/localhost/htdocs/redmine; RAILS_ENV=production /usr/lib/ruby/gems/1.8/bin/rake db:migrate&amp;quot; lighttpd&lt;br /&gt;
&lt;br /&gt;
=Setup Lighttpd=&lt;br /&gt;
&lt;br /&gt;
Now our database is ready, we need to configure Lighttpd. We have included an example Redmine/Ligghtpd configuration based on FastCGI. You can find it in /etc/lighttpd.&lt;br /&gt;
When you are finished setting up Ligghtpd configuation include it inside lighttpd.conf and we can start it.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|vi /etc/lighttpd/redmine-virtual.conf}}&lt;br /&gt;
&lt;br /&gt;
{{Cmd|vi /etc/lighttpd/lighttpd.conf}}&lt;br /&gt;
&lt;br /&gt;
  ... &lt;br /&gt;
  include &amp;quot;redmine-virtual.conf&amp;quot;&lt;br /&gt;
  ...&lt;br /&gt;
&lt;br /&gt;
{{Cmd|/etc/init.d/lighttpd start}}&lt;br /&gt;
&lt;br /&gt;
If your server does not run, you can find information in /var/log/lighttpd. If that does not provide a clue you can also run Lighttpd in foreground. It should display some more debug information.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|/etc/init.d/lighttpd stop&lt;br /&gt;
lighttpd -f /etc/lighttpd/lighttpd.conf -D}}&lt;br /&gt;
&lt;br /&gt;
= Enabling Email to Ticket =&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; This configuration is not very secure in that it uses out of the box postfix configuration.  It&#039;s assumed that additional configuration will be applied to postfix, but that is outside of the scope of this section.&lt;br /&gt;
&lt;br /&gt;
First, add postfix.&lt;br /&gt;
{{Cmd|apk add postfix}}&lt;br /&gt;
Add aliases to /etc/postfix/aliases (replace url with your URL and InsertKeyHere with your Redmine key):&lt;br /&gt;
 test: &amp;quot;|ruby /var/www/localhost/htdocs/redmine/extra/mail_handler/rdm-mailhandler.rb --url http://bugs.alpinelinux.org --key InsertKeyHere --project=test --unknown-user=accept --no-permission-check&amp;quot;&lt;br /&gt;
Create aliases db&lt;br /&gt;
 newaliases&lt;br /&gt;
Start Postfix&lt;br /&gt;
 /etc/init.d/postfix start&lt;br /&gt;
 rc-update add postfix&lt;br /&gt;
&lt;br /&gt;
=Optional: Enable Email to Ticket for Unknown Users=&lt;br /&gt;
Note: To enable email to ticket creation from unknown users/email addresses (after allowing anonymous issue creation within Redmine UI) for the &#039;myproject&#039; project in Redmine, create the following script and have your email server pipe new emails to this script:&lt;br /&gt;
&lt;br /&gt;
  #!/usr/bin/perl&lt;br /&gt;
  # Author: Jeff Bilyk&lt;br /&gt;
  # March 2, 2011&lt;br /&gt;
  #Script to take email from stdin, then:&lt;br /&gt;
  # - Check redmine database to see if the user exists&lt;br /&gt;
  #   - If user doesn&#039;t exist, create the user&lt;br /&gt;
  # - Pass the email on the redmine utility:&lt;br /&gt;
  #   - echo &amp;quot;email contents&amp;quot; | rake redmine:email:read RAILS_ENV=&amp;quot;production&amp;quot; project=myproject&lt;br /&gt;
  &lt;br /&gt;
  use strict;&lt;br /&gt;
  use DBI;&lt;br /&gt;
  # global variables&lt;br /&gt;
  my $DbName = &#039;redmine&#039;;&lt;br /&gt;
  my $DbUser = &#039;redmine&#039;;&lt;br /&gt;
  my $DbPassword = &#039;Secur3P@ass&#039;;&lt;br /&gt;
  my @fields;&lt;br /&gt;
  my @address;&lt;br /&gt;
  my $existinguser;&lt;br /&gt;
  &lt;br /&gt;
  # Get email from stdin&lt;br /&gt;
  my @email = &amp;lt;STDIN&amp;gt;;&lt;br /&gt;
  &lt;br /&gt;
  # Parse field for &amp;quot;for&amp;quot;&lt;br /&gt;
  foreach (@email)&lt;br /&gt;
  {&lt;br /&gt;
  	if ($_ =~ /From/)&lt;br /&gt;
  	{&lt;br /&gt;
  		@fields = (split /&amp;lt;/,$_);&lt;br /&gt;
  		@address = (split /&amp;gt;/,$fields[1]);&lt;br /&gt;
  	}&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  my $dbh = DBI-&amp;gt;connect(&#039;dbi:mysql:&#039; . $DbName, $DbUser, $DbPassword, { PrintError =&amp;gt; 0 }) or die &amp;quot;SQL Connect Error:&amp;quot; . DBI-&amp;gt;errstr;&lt;br /&gt;
  &lt;br /&gt;
  # Find out if there&#039;re any existing users with the specified email address&lt;br /&gt;
  my $sqlStatement = &amp;quot;SELECT * from users where mail = &#039;$address[0]&#039;;&amp;quot;;&lt;br /&gt;
  &lt;br /&gt;
  my $sqlCommand = $dbh-&amp;gt;prepare($sqlStatement);&lt;br /&gt;
  &lt;br /&gt;
  $sqlCommand-&amp;gt;execute or die &amp;quot;SQL Error: &amp;quot; . DBI-&amp;gt;errstr;&lt;br /&gt;
  &lt;br /&gt;
  my @sqlRecordset;&lt;br /&gt;
  $existinguser = &#039;maybe&#039;;&lt;br /&gt;
  &lt;br /&gt;
  @sqlRecordset = $sqlCommand-&amp;gt;fetchrow_array;&lt;br /&gt;
  &lt;br /&gt;
  if ($sqlRecordset[0] == &#039;&#039;) {&lt;br /&gt;
  	printf &amp;quot;@sqlRecordset \n&amp;quot;;&lt;br /&gt;
  	$existinguser = &#039;no&#039;;&lt;br /&gt;
  }&lt;br /&gt;
  else {&lt;br /&gt;
  	$existinguser = &#039;yes&#039;;&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  # If there isn&#039;t a user already, then create one&lt;br /&gt;
  if ($existinguser == &#039;no&#039;)&lt;br /&gt;
  {&lt;br /&gt;
  	my @name = (split /@/,$address[0]);&lt;br /&gt;
  	printf &amp;quot;Current variables: $name[0]  $address[0]  \n&amp;quot;;&lt;br /&gt;
  	$sqlStatement = &amp;quot;INSERT INTO users (login, firstname, lastname, mail, mail_notification, admin, status, language, type) values (\&amp;quot;$name[0]\&amp;quot;, \&amp;quot;$name[0]\&amp;quot;, \&amp;quot; \&amp;quot;, \&amp;quot;$address[0]\&amp;quot;, 0, 0, 1, \&amp;quot;en\&amp;quot;, \&amp;quot;User\&amp;quot;);&amp;quot;;&lt;br /&gt;
  	$sqlCommand = $dbh-&amp;gt;prepare($sqlStatement);&lt;br /&gt;
  	$sqlCommand-&amp;gt;execute or die &amp;quot;SQL Error: &amp;quot; .DBI-&amp;gt;errstr;&lt;br /&gt;
  	printf &amp;quot;User created&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  my $timeinsec = `date +%s`;&lt;br /&gt;
  open (MYFILE, &amp;quot;&amp;gt;&amp;gt;/var/tmp/$timeinsec&amp;quot;);&lt;br /&gt;
  print MYFILE &amp;quot;@email&amp;quot;;&lt;br /&gt;
  close (MYFILE);&lt;br /&gt;
  &lt;br /&gt;
  system(&amp;quot;sed -i &#039;s/^  //&#039; /var/tmp/$timeinsec&amp;quot;);&lt;br /&gt;
  system(&amp;quot;sed -i &#039;s/^ //&#039; /var/tmp/$timeinsec&amp;quot;);&lt;br /&gt;
  &lt;br /&gt;
  `cd /usr/share/webapps/redmine &amp;amp;&amp;amp; rake redmine:email:read RAILS_ENV=&amp;quot;production&amp;quot; project=myproject &amp;lt; /var/tmp/$timeinsec`;&lt;br /&gt;
  exit 0&lt;br /&gt;
&lt;br /&gt;
This document is a Work In Progress.&lt;br /&gt;
&lt;br /&gt;
[[Category:Server]]&lt;br /&gt;
[[Category:Ruby]]&lt;br /&gt;
[[Category:SQL]]&lt;br /&gt;
[[Category:Programming]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Installing Redmine Since 2.1.2=&lt;br /&gt;
&lt;br /&gt;
Redmine in Alpine has switched from lighttpd to unicorn httpd (ruby-fcgi currently has issues and according to redmine devs its the prefered way to run redmine).&lt;br /&gt;
&lt;br /&gt;
This basic howto is based on sqlite and has only been tested with sqlite. We need to install the following packages:&lt;br /&gt;
&lt;br /&gt;
 {{Cmd|apk add ruby-sqlite ruby-redmine-unicorn redmine}}&lt;br /&gt;
&lt;br /&gt;
Copy the sample config file inside /etc/unicorn&lt;br /&gt;
&lt;br /&gt;
 {{Cmd|cp /etc/unicorn/redmine.conf.rb.sample /etc/unicorn/redmine.conf.rb}}&lt;br /&gt;
&lt;br /&gt;
Edit unicorn conf.d file and set the config file to /etc/unicorn/redmine.conf.rb&lt;br /&gt;
&lt;br /&gt;
 {{Cmd|vim /etc/conf.d/unicorn}}&lt;br /&gt;
&lt;br /&gt;
Edit redmine database config and set sqlite as database&lt;br /&gt;
&lt;br /&gt;
 {{Cmd|vim /etc/redmine/database.yml}}&lt;br /&gt;
&lt;br /&gt;
Make sure the database directory exists and change owner to redmine&lt;br /&gt;
&lt;br /&gt;
 {{Cmd|cd /usr/share/webapps/redmine}}&lt;br /&gt;
 {{Cmd|sudo -u redmine rake generate_secret_token}}&lt;br /&gt;
 {{Cmd|sudo -u redmine RAILS_ENV&amp;amp;#x3D;production rake db:migrate}}&lt;br /&gt;
&lt;br /&gt;
Make sure redmine.conf.rb is correct and run:&lt;br /&gt;
&lt;br /&gt;
 {{Cmd|/etc/init.d/unicorn start}}&lt;br /&gt;
&lt;br /&gt;
This will start unicorn httpd and listens on 0.0.0.0:8080 by default.&lt;br /&gt;
&lt;br /&gt;
Unicorn is a very basic httpd it is advised to use a reverse proxy in front of it like nginx, pound or any other reverse proxy.&lt;br /&gt;
&lt;br /&gt;
Install additional plugins&lt;br /&gt;
&lt;br /&gt;
*Copy the plugin directory into the vendor/plugins directory.&lt;br /&gt;
&lt;br /&gt;
*Do migration task. (e.g. rake db:migrate_plugins RAILS_ENV=production)&lt;br /&gt;
&lt;br /&gt;
*(Re)Start Unicorn.&lt;br /&gt;
&lt;br /&gt;
Make sure that the plugin is compatible with your redmine. Installation procedure may vary depending on the plugin.&lt;/div&gt;</summary>
		<author><name>Hamletmun</name></author>
	</entry>
</feed>