Skip to content

Instantly share code, notes, and snippets.

View susieyy's full-sized avatar

yohei sugigami susieyy

View GitHub Profile
# redmine-supybot-plugin / init.rb
require_dependency 'supy_issue_hook'
# redmine-supybot-plugin / lib / suppy_issue_hook.rb
class SupyIssueHook < Redmine::Hook::Listener
def controller_issues_new_after_save(context = { })
subject = context[:issue].subject
project = context[:project].description
#!/bin/sh
file_name=`date +%Y%m%d_%H%M`_svn.dump.gz
home=/home/subversion
svn=$home/svn
svnadmin dump $svn | gzip > $home/$file_name
smbclient //HS-DTGL5C9/share -U administrator -N -c "put ${home}/${file_name} /Backup/${file_name}"
rm $home/$file_name
#
# Main
#
if __FILE__ == $0
end